aMule Bug Tracker - aMule
View Issue Details
0001232aMuleSharedfilespublic2008-01-03 23:222008-01-06 14:24
mr_hyde 
Xaignar 
normalmajorsometimes
resolvedfixed 
SVN 
 
Any
0001232: Sometimes amule crash on start.
Sometimes amule crashes on start
No tags attached.
diff ThreadTasks.cpp.diff (719) 2008-01-03 23:49
http://bugs.amule.org/file_download.php?file_id=214&type=bug
Issue History
2008-01-03 23:22mr_hydeNew Issue
2008-01-03 23:22mr_hydeOperating System => Any
2008-01-03 23:49mr_hydeFile Added: ThreadTasks.cpp.diff
2008-01-03 23:54mr_hydeNote Added: 0002483
2008-01-04 19:23XaignarStatusnew => acknowledged
2008-01-04 19:23XaignarStatusacknowledged => assigned
2008-01-04 19:23XaignarAssigned To => Xaignar
2008-01-06 14:24XaignarStatusassigned => resolved
2008-01-06 14:24XaignarResolutionopen => fixed
2008-01-06 14:24XaignarNote Added: 0002485

Notes
(0002483)
mr_hyde   
2008-01-03 23:54   
I made some mistakes while writing this report.

Anyway amule can crash while hashing part files with following error:

/usr/lib64/gcc/x86_64-slamd64-linux/4.1.2/../../../../include/c++/4.1.2/debug/vector:192:
    error: attempt to subscript container with out-of-bounds index 0, but
    container only holds 0 elements.

Objects involved in the operation:
sequence "this" @ 0x0x45008c80 {
  type = N15__gnu_debug_def6vectorIhSaIhEEE;
}


The problem is in ThreadTasks.cpp, in method CHashingTask::Entry().
In facts sometimes this method is called for files with EMPTY hashlist.
The attached patch (against aMule CVS 20080103 version) is JUST TO AVOID the crash, not a real fix (I think... I don't know the code).
Bye,
  Mr Hyde
(0002485)
Xaignar   
2008-01-06 14:24   
Should be fixed in SVN now.