In CVS-20080102.
Well. The topic might sound strange though, but I cannot find a better description. Here is what had happened.
I was downloading a file with parts completed. I can see someone is downloading the completed parts from me. Then I canceled, the part file, the page is refreshed automatically, meanwhile the amuleweb crashed with segfault.
The backtrace:
#0 0x000000000041dd12 in wxStringBase::c_str (this=0x0) at /usr/include/wx-2.8/wx/string.h:527
#1 0x000000000041dd7d in wxString::operator wchar_t const* (this=0x0) at /usr/include/wx-2.8/wx/string.h:832
#2 0x000000000047c761 in amule_upload_file_prop_get (ptr=0x8e75d0, prop_name=0x8ecd00 "name", result=0x41400510) at php_core_lib.cpp:1249
#3 0x00000000004703f0 in php_expr_eval (expr=0x8ecd20, result=0x41400510) at php_syntree.cpp:1469
#4 0x00000000004706f5 in php_execute (node=0x8ed000, result=0x0) at php_syntree.cpp:1822
#5 0x0000000000470a59 in php_execute (node=0x8e35d0, result=0x414007c0) at php_syntree.cpp:1900
#6 0x0000000000479f82 in CPhPLibContext::Execute (this=0x8b6650, buf=0x414008c0) at php_core_lib.cpp:1703
#7 0x000000000047a1cf in CPhpFilter (this=0x4140090f, server=0x8096e0, sess=0x8b1d18,
file=0x8e7170 "/usr/local/share/amule/webserver/default/downloads.php", buff=0x414008c0) at php_core_lib.cpp:1781
#8 0x0000000000410857 in CScriptWebServer::ProcessPhpRequest (this=0x8096e0, filename=0x8e7170 "/usr/local/share/amule/webserver/default/downloads.php",
sess=0x8b1d18, size=@0x414009c8) at WebServer.cpp:1773
#9 0x000000000041903c in CScriptWebServer::ProcessURL (this=0x8096e0, Data=@0x41400e80) at WebServer.cpp:1894
#10 0x0000000000447d40 in CWebSocket::OnRequestReceived (this=0x8e6c60,
pHeader=0x797ac4 "HTTP/1.1\r\nHost: localhost:32001\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11\r\nAccept: text/xml,application/xml,application/xhtml+xml,text/h"..., pData=0x0, dwDataLen=0) at WebSocket.cpp:375
#11 0x000000000044857f in CWCThread::Entry (this=0x8e6c40) at WebSocket.cpp:240
#12 0x00000036dd3f931d in wxThreadInternal::PthreadStart () from /usr/lib64/libwx_baseu-2.8.so.0
#13 0x00000036dcf062ea in start_thread () from /lib64/libpthread.so.0
#14 0x00000036dc6cb73d in clone () from /lib64/libc.so.6
#15 0x0000000000000000 in ?? ()
Relevent full backtrace:
#0 0x000000000041dd12 in wxStringBase::c_str (this=0x0) at /usr/include/wx-2.8/wx/string.h:527
No locals.
#1 0x000000000041dd7d in wxString::operator wchar_t const* (this=0x0) at /usr/include/wx-2.8/wx/string.h:832
No locals.
#2 0x000000000047c761 in amule_upload_file_prop_get (ptr=0x8e75d0, prop_name=0x8ecd00 "name", result=0x41400510) at php_core_lib.cpp:1249
sharedfile = (SharedFile *) 0x0
obj = (UploadFile *) 0x8e75d0
I think it happens when the entry in SharedFile container is deleted, however, the file entry is still active in UploadFile container. A possible solution is when the UploadFile is not in SharedFile, we return a dummy file name.