aMule SVN 8414/24.4.
Program crashed while completing a file. There is a Null-pointer reference in DownloadClient.cpp
The file which caused the crash was not the completing file however.
Program received signal SIGSEGV, Segmentation fault.
CUpDownClient::ProcessBlockPacket (this=0x1049c880,
packet=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, packed=false,
largeblocks=false) at DownloadClient.cpp:1013
1013 DownloadClient.cpp: No such file or directory.
in DownloadClient.cpp
Current language: auto; currently c++
(gdb) bt
#0 CUpDownClient::ProcessBlockPacket (this=0x1049c880,
packet=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, packed=false,
largeblocks=false) at DownloadClient.cpp:1013
#1 0x00433912 in CClientTCPSocket::ProcessPacket (this=0x106b50f8,
buffer=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, opcode=70 'F')
at ClientTCPSocket.cpp:710
#2 0x004360f1 in CClientTCPSocket::PacketReceived (this=0x106b50f8,
packet=0x8c1dad0) at ClientTCPSocket.cpp:2015
#3 0x00454071 in CEMSocket::OnReceive (this=0x106b50f8, nErrorCode=0)
at EMSocket.cpp:328
#4 0x004290f9 in CClientTCPSocket::OnReceive (this=0x106b50f8, nErrorCode=0)
at ClientTCPSocket.cpp:1920
#5 0x00834715 in wxEvtHandler::ProcessEventIfMatches ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#6 0x00834a6c in wxEventHashTable::HandleEvent ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#7 0x00835a69 in wxEvtHandler::ProcessEvent ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#8 0x00835889 in wxEvtHandler::ProcessPendingEvents ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#9 0x00833a24 in wxAppConsole::ProcessPendingEvents ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#10 0x00a21ad5 in wxIdleWakeUpModule::MsgHookProc ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#11 0x7e36f84a in USER32!EnableMenuItem () from C:\WINDOWS\system32\user32.dll
#12 0x00000000 in ?? ()
(gdb)
(gdb) bt full 1
#0 CUpDownClient::ProcessBlockPacket (this=0x1049c880,
packet=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, packed=false,
largeblocks=false) at DownloadClient.cpp:1013
lenWritten = 10240
cur_block = (Pending_Block_Struct *) 0x100cb718
data = {<CFileDataIO> = {_vptr$CFileDataIO = 0xcc3890},
m_growthRate = 0, m_position = 24, m_BufferSize = 10264,
m_fileSize = 10264, m_delete = false, m_readonly = true,
m_buffer = 0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY"}
it = {<_Safe_iterator_base> = {_M_sequence = 0x1049ca1c,
_M_version = 0, _M_prior = 0x0, _M_next = 0x0}, _M_current = {
_M_node = 0xb7378a8}}
this = (CUpDownClient * const) 0x1049c880
packed = false
largeblocks = false
header_size = 24
nStartPos = 3550709760
nEndPos = 3550719999
nBlockSize = 0
lenUnzipped = 0
header_size = 24
nStartPos = 3550709760
nEndPos = 3550719999
nBlockSize = 0
lenUnzipped = 0
(More stack frames follow...)
(gdb) thread apply all bt
Thread 5 (thread 944.0x118):
#0 0x7c91eb94 in ntdll!LdrAccessResource ()
from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91e9c0 in ntdll!ZwWaitForSingleObject ()
from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8025cb in WaitForSingleObjectEx ()
from C:\WINDOWS\system32\kernel32.dll
#3 0x00000508 in ?? ()
#4 0x00000000 in ?? ()
Thread 3 (thread 944.0xe54):
#0 0x7c91eb94 in ntdll!LdrAccessResource ()
from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91d85c in ntdll!ZwDelayExecution () from C:\WINDOWS\system32\ntdll.dll
#2 0x7c8023ed in SleepEx () from C:\WINDOWS\system32\kernel32.dll
#3 0x00000000 in ?? ()
Thread 2 (thread 944.0x77c):
#0 0x7c91eb94 in ntdll!LdrAccessResource ()
from C:\WINDOWS\system32\ntdll.dll
#1 0x7c91e31b in ntdll!ZwRemoveIoCompletion ()
from C:\WINDOWS\system32\ntdll.dll
#2 0x719bd609 in WSPStartup () from C:\WINDOWS\System32\mswsock.dll
#3 0x0000061c in ?? ()
#4 0x0c88ffbc in ?? ()
#5 0x0c88ffb0 in ?? ()
#6 0x0c88ffa4 in ?? ()
#7 0x719bd650 in WSPStartup () from C:\WINDOWS\System32\mswsock.dll
#8 0x0022f558 in ?? ()
#9 0x7c91ee18 in strchr () from C:\WINDOWS\system32\ntdll.dll
#10 0x00262068 in ?? ()
#11 0x00000000 in ?? ()
Thread 1 (thread 944.0xfdc):
#0 CUpDownClient::ProcessBlockPacket (this=0x1049c880,
packet=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, packed=false,
largeblocks=false) at DownloadClient.cpp:1013
#1 0x00433912 in CClientTCPSocket::ProcessPacket (this=0x106b50f8,
buffer=0x1028fe80 "){O3\022\027]Ênþ<¬\0331ßY", size=10264, opcode=70 'F')
at ClientTCPSocket.cpp:710
#2 0x004360f1 in CClientTCPSocket::PacketReceived (this=0x106b50f8,
packet=0x8c1dad0) at ClientTCPSocket.cpp:2015
#3 0x00454071 in CEMSocket::OnReceive (this=0x106b50f8, nErrorCode=0)
at EMSocket.cpp:328
#4 0x004290f9 in CClientTCPSocket::OnReceive (this=0x106b50f8, nErrorCode=0)
at ClientTCPSocket.cpp:1920
#5 0x00834715 in wxEvtHandler::ProcessEventIfMatches ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#6 0x00834a6c in wxEventHashTable::HandleEvent ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#7 0x00835a69 in wxEvtHandler::ProcessEvent ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#8 0x00835889 in wxEvtHandler::ProcessPendingEvents ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#9 0x00833a24 in wxAppConsole::ProcessPendingEvents ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#10 0x00a21ad5 in wxIdleWakeUpModule::MsgHookProc ()
at c:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostr
eam:77
#11 0x7e36f84a in USER32!EnableMenuItem () from C:\WINDOWS\system32\user32.dll
#12 0x00000000 in ?? ()
(gdb) print *cur_block
$2 = {block = 0x0, zStream = 0x976ea40, totalUnzipped = 0, fZStreamError = 0,
fRecovered = 0}
Offending line of code:
if (nEndPos == cur_block->block->EndOffset) {
I can't bt full more outer frames because they totally flood my terminal.