See
http://bugs.amule.org/view.php?id=1232.
Sometimes amule crashes with following message:
/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 src/TreadTasks.cpp, method void CHashingTask::Entry(). Here you can read:
if ((m_toHash & EH_MD4) && !TestDestroy()) {
// If the file is < PARTSIZE, then the filehash is that one hash,
// otherwise, the filehash is the hash of the parthashes
if ( knownfile->m_hashlist.size() == 1 ) {
knownfile->m_abyFileHash = knownfile->m_hashlist[0];
knownfile->m_hashlist.clear();
} else {
const unsigned int len = knownfile->m_hashlist.size() * 16;
std::vector<byte> data(len);
for (size_t i = 0; i < knownfile->m_hashlist.size(); ++i) {
memcpy(&(data[16*i]), knownfile->m_hashlist[i].GetHash(), 16);
}
std::vector<byte> hash(16);
knownfile->CreateHashFromString( &(data[0]), len, &(hash[0]), NULL );
knownfile->m_abyFileHash.SetHash( (byte*)&(hash[0]) );
}
Sometimes (at least this happens to me) knownfile->m_hashlist IS EMPTY and this causes the crash.
I just patched the code to avoid the crash, but I don't consider this a real fix (I don't know enough the code).
The patch is in attach here and in bugs.amule.org.
By the way: I made mistakes while posting in bugs.amule.org. Is it possible to modify reports posted in bugs.amule.org?
Bye,
Mr Hyde