aMule Bug Tracker - aMule
View Issue Details
0000662aMuleUtilitiespublic2005-11-17 17:402005-11-17 17:49
nich 
Kry 
normalcrashalways
resolvedfixed 
SVN 
SVN 
0000662: amulecmd crashes on invalid pause command
Whenever using the pause command with amulecmd, if the hash passed as a parameter is not a valid one (i.e. not made of *exactly* 32 [0-9][a-e] characters), it crashes.

i.e.: 'pause 0', 'pause 1CCD847171E49FD1D99A4E80DA' and 'pause 1CCD847171E49FD1D99A4E80DA1CCD847171E49FD1D99A4E80DA' crashes, while 'pause 1CCD847171E49FD1D99A4E80DA283025' is ok.

I'd expect it to at least tell me what went wrong. >_>

Besides, it'd be nice to have a way other than the ed2k hash for pausing/managing files (like listing the number used for the part file name). Hashes are awfully long and copy/pasting sucks. >_>

It seems the resume command also suffers from this (and I'd expect the cancel command as well).
A simple example of a program generated backtrace:
14:54:57: Debug: MD4Hash.h(167): assert "hash.Length() == MD4HASH_LENGTH * 2" failed.

Call stack:
[05] wxStackWalker::Walk(unsigned)
[06] 0xb7d425ba
[07] 0xb7d4274d
[08] wxAppConsole::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)
[09] wxOnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)
[10] wxAssert(int, wchar_t const*, int, wchar_t const*, wchar_t const*)
[11] CMD4Hash::Decode(wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/MD4Hash.h:169
[12] CMD4Hash::CMD4Hash(wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/MD4Hash.h:85
[13] CamulecmdApp::ProcessCommand(int) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/TextClient.cpp:275
[14] CaMuleExternalConnector::Parse_Command(wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/ExternalConnector.cpp:292
[15] CaMuleExternalConnector::TextShell(wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/ExternalConnector.cpp:377
[16] CamulecmdApp::TextShell(wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/TextClient.cpp:118
[17] CaMuleExternalConnector::ConnectAndRun(wxString const&, wxString const&) /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/ExternalConnector.cpp:487
[18] CamulecmdApp::OnRun() /home/nich/arquivos/programas/amule-cvs/cvs/amule-5801/src/TextClient.cpp:702

Don't think gdb is necessary in this case, is it?
No tags attached.
Issue History
2005-11-17 17:40nichNew Issue
2005-11-17 17:42KryStatusnew => assigned
2005-11-17 17:42KryAssigned To => Kry
2005-11-17 17:49KryStatusassigned => resolved
2005-11-17 17:49KryFixed in Version => CVS
2005-11-17 17:49KryResolutionopen => fixed
2005-11-17 17:49KryNote Added: 0001477

Notes
(0001477)
Kry   
2005-11-17 17:49   
Fixed and commited.