From kfm-devel Tue Jan 26 15:14:38 1999 From: David Faure Date: Tue, 26 Jan 1999 15:14:38 +0000 To: kfm-devel Subject: Fwd: old html cache bug -> kfm segfaults X-MARC-Message: https://marc.info/?l=kfm-devel&m=91902935106174 If somebody has an idea about this strange sigsegv I experienced and the related gdb output : (The code in htmlcache.cpp is mostly from Torben, I didn't change it at all, Jacek only added the Cache menu entry (enabling/disabling), ... so I posted to Torben him too but he might have no time for this) To make the crash happen, I open a WWWUrl kdelnk on the desktop, let it load a little but not completely, then close the window (using the kwm cross), then re-open it again quickly. It seems that some kioslave loading images are still loading, so the static QList *staticJobList is being updated while it's being read (is it possible ?). The crash is Program received signal SIGSEGV, Segmentation fault. 0x80acd36 in HTMLCache::slotURLRequest (this=0x8336f78, _url=0x83cf030 "http://www/Images/som_fra3.jpg") at htmlcache.cpp:83 83 if ( strcmp( _url, job->getSrcURL() ) == 0 ) (gdb) p job $1 = (HTMLCacheJob *) 0x0 (gdb) p staticJobList->count() $2 = 4 The related lines in htmlcache.cpp are // Are we waiting for this URL already ? // We can see all jobs of every instance here. HTMLCacheJob *job; for ( job = staticJobList->first(); job != 0L; job = staticJobList->next() ) if ( strcmp( _url, job->getSrcURL() ) == 0 ) return; It's really strange to me : how can job be 0L, in the above for loop ? (gdb) p staticJobList->at(0) $5 = (void *) 0x83e5db0 (gdb) p staticJobList->at(1) $6 = (void *) 0x83df200 (gdb) p staticJobList->at(2) $7 = (void *) 0x841fe00 (gdb) p staticJobList->at(3) $8 = (void *) 0x841f350 (gdb) p staticJobList->at(4) QGList::locate: Index 4 out of range $9 = (void *) 0x0 The list looks fine... Hum, I even tried (gdb) p staticJobList->first() $10 = (void *) 0x83e5db0 (gdb) p staticJobList->next() $11 = (void *) 0x83df200 (gdb) $12 = (void *) 0x841fe00 (gdb) $13 = (void *) 0x841f350 (gdb) $14 = (void *) 0x0 Can a slot call interrupt the for loop, change the list, and then go back to the for loop ? It isn't multithreaded is it ? Thanks for any hint ... -- ____________________________________________________________________ | | | David FAURE | | E-mail : David.Faure@insa-lyon.fr, faure@kde.org | | http://www.insa-lyon.fr/People/AEDI/dfaure/index.html | |____________________________________________________________________| ----- End forwarded message ----- -- ____________________________________________________________________ | | | David FAURE | | E-mail : David.Faure@insa-lyon.fr, faure@kde.org | | http://www.insa-lyon.fr/People/AEDI/dfaure/index.html | |____________________________________________________________________|