Crash in kdelibs

Andras Mantia amantia at kde.org
Tue Mar 1 11:55:26 GMT 2005


Hi,

 I experienced a crash in kdelibs that was reported by some users in the 
past, but could never reproduce it until today (and I thought it's 
already fixed). The BT is below, the reason of the actual crash is 
clear (holders is NULL in KDirListerCache::forgetDirs), and somebody 
already expected to be NULL in some cases as there is a Q_ASSERT there:
  QPtrList<KDirLister> *holders = urlsCurrentlyHeld[urlStr];
  Q_ASSERT( holders );
  holders->removeRef( lister );

The first question is how this can be NULL and how can one avoid it to 
be NULL. 
The second question is that if it can be NULL, why isn't there a 
NULL-check instead of the Q_ASSERT?

Andras


#0  0x41e3ea7e in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#1  0x412887cb in KCrash::defaultCrashHandler (sig=11) 
at /data/development/sources/kde-head/kdelibs/kdecore/kcrash.cpp:251
#2  <signal handler called>
#3  0x41a1ad57 in QGList::findRef (this=0x0, d=0x8d31a00, 
fromStart=true) at qglist.cpp:719
#4  0x41a1a8a3 in QGList::removeRef (this=0x0, d=0x8d31a00) at 
qglist.cpp:553
#5  0x40c9e81f in QPtrList<KDirLister>::removeRef (this=0x0, 
d=0x8d31a00) at qptrlist.h:86
#6  0x40c940bd in KDirListerCache::forgetDirs (this=0x861aed0, 
lister=0x8d31a00, _url=@0xbfffdb40, notify=true) 
at /data/development/sources/kde-head/kdelibs/kio/kio/kdirlister.cpp:440
#7  0x40c92d39 in KDirListerCache::listDir (this=0x861aed0, 
lister=0x8d31a00, _u=@0xbfffdca0, _keep=true, _reload=false) 
at /data/development/sources/kde-head/kdelibs/kio/kio/kdirlister.cpp:123
#8  0x40c9a192 in KDirLister::openURL (this=0x8d31a00, _url=@0xbfffdca0, 
_keep=true, _reload=false) 
at /data/development/sources/kde-head/kdelibs/kio/kio/kdirlister.cpp:1633
#9  0x40d6c281 in KFileTreeBranch::populate (this=0x8d31a00, 
url=@0xbfffdca0, currItem=0x8d348e0) 
at /data/development/sources/kde-head/kdelibs/kio/kfile/kfiletreebranch.cpp:513
#10 0x40d65cf4 in KFileTreeView::slotExpanded (this=0x863f2b0, 
item=0x8d348e0) 
at /data/development/sources/kde-head/kdelibs/kio/kfile/kfiletreeview.cpp:304
#11 0x40d680c2 in KFileTreeView::qt_invoke (this=0x863f2b0, _id=112, 
_o=0xbfffde70) at kfiletreeview.moc:347
#12 0x081be00c in BaseTreeView::qt_invoke (this=0x863f2b0, _id=112, 
_o=0xbfffde70) at basetreeview.moc:441
#13 0x08192b0d in ProjectTreeView::qt_invoke (this=0x863f2b0, _id=112, 
_o=0xbfffde70) at projecttreeview.moc:353
#14 0x41746acb in QObject::activate_signal (this=0x863f2b0, 
clist=0x8642c58, o=0xbfffde70) at qobject.cpp:2355
#15 0x41ab6c99 in QListView::expanded (this=0x863f2b0, t0=0x8d348e0) at 
moc_qlistview.cpp:547
#16 0x4182ed89 in QListViewItem::setOpen (this=0x8d348e0, o=true) at 
qlistview.cpp:1506
#17 0x08192f79 in KFileTreeBranch::setOpen (this=0x8d31a00, 
setopen=true) at kfiletreebranch.h:121
#18 0x081911f7 in ProjectTreeView::slotPopulateFinished (this=0x863f2b0, 
item=0x8d348e0) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/treeviews/projecttreeview.cpp:494
#19 0x081928b8 in ProjectTreeView::qt_invoke (this=0x863f2b0, _id=152, 
_o=0xbfffe040) at projecttreeview.moc:333
#20 0x41746c18 in QObject::activate_signal (this=0x8d31a00, 
clist=0x8b803f0, o=0xbfffe040) at qobject.cpp:2379
#21 0x40d6c4f0 in KFileTreeBranch::populateFinished (this=0x8d31a00, 
t0=0x8d348e0) at kfiletreebranch.moc:171
#22 0x40d6bbda in KFileTreeBranch::slCompleted (this=0x8d31a00, 
url=@0xbfffe2b0) 
at /data/development/sources/kde-head/kdelibs/kio/kfile/kfiletreebranch.cpp:409
#23 0x40d6c90f in KFileTreeBranch::qt_invoke (this=0x8d31a00, _id=13, 
_o=0xbfffe1e0) at kfiletreebranch.moc:211
#24 0x081bd0fa in BaseTreeBranch::qt_invoke (this=0x8d31a00, _id=13, 
_o=0xbfffe1e0) at basetreeview.moc:87
#25 0x41746acb in QObject::activate_signal (this=0x8d31a00, 
clist=0x8c065a0, o=0xbfffe1e0) at qobject.cpp:2355
#26 0x40c9c67d in KDirLister::completed (this=0x8d31a00, t0=@0xbfffe2b0) 
at kdirlister.moc:234
#27 0x40c9315b in KDirListerCache::listDir (this=0x861aed0, 
lister=0x8d31a00, _u=@0xbfffe420, _keep=true, _reload=false) 
at /data/development/sources/kde-head/kdelibs/kio/kio/kdirlister.cpp:191
#28 0x40c9a192 in KDirLister::openURL (this=0x8d31a00, _url=@0xbfffe420, 
_keep=true, _reload=false) 
at /data/development/sources/kde-head/kdelibs/kio/kio/kdirlister.cpp:1633
#29 0x40d6c281 in KFileTreeBranch::populate (this=0x8d31a00, 
url=@0xbfffe420, currItem=0x8d348e0) 
at /data/development/sources/kde-head/kdelibs/kio/kfile/kfiletreebranch.cpp:513
#30 0x0818f7f3 in ProjectTreeView::newBranch (this=0x863f2b0, 
url=@0x863f410) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/treeviews/projecttreeview.cpp:216
#31 0x0819023a in ProjectTreeView::slotReloadTree (this=0x863f2b0, 
fileList=0x87541fc, buildNewTree=true, folderToOpen=@0xbfffe790) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/treeviews/projecttreeview.cpp:331
#32 0x08192830 in ProjectTreeView::qt_invoke (this=0x863f2b0, _id=150, 
_o=0xbfffe6a0) at projecttreeview.moc:331
#33 0x41746acb in QObject::activate_signal (this=0x87540d0, 
clist=0x86be758, o=0xbfffe6a0) at qobject.cpp:2355
#34 0x08108085 in Project::reloadTree (this=0x87540d0, t0=0x87541fc, 
t1=true, t2=@0xbfffe790) at project.moc:305
#35 0x0811daa4 in ProjectPrivate::slotAcceptCreateProject 
(this=0x8754108) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/project/projectprivate.cpp:822
#36 0x08120182 in ProjectPrivate::slotNewProject (this=0x8754108) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/project/projectprivate.cpp:1159
#37 0x0812357d in ProjectPrivate::qt_invoke (this=0x8754108, _id=4, 
_o=0xbfffea20) at projectprivate.moc:166
#38 0x41746acb in QObject::activate_signal (this=0x8755878, 
clist=0x8755ae8, o=0xbfffea20) at qobject.cpp:2355
#39 0x4174696a in QObject::activate_signal (this=0x8755878, signal=2) at 
qobject.cpp:2324
#40 0x40f2b9e0 in KAction::activated (this=0x8755878) at kaction.moc:171
#41 0x40f2b00f in KAction::slotActivated (this=0x8755878) 
at /data/development/sources/kde-head/kdelibs/kdeui/kaction.cpp:1102
#42 0x40f2b202 in KAction::slotPopupActivated (this=0x8755878) 
at /data/development/sources/kde-head/kdelibs/kdeui/kaction.cpp:1129
#43 0x40f2be19 in KAction::qt_invoke (this=0x8755878, _id=15, 
_o=0xbfffeba0) at kaction.moc:213
#44 0x41746acb in QObject::activate_signal (this=0x8720f78, 
clist=0x8721020, o=0xbfffeba0) at qobject.cpp:2355
#45 0x41aa0e40 in QSignal::signal (this=0x8720f78, t0=@0x8720fa0) at 
moc_qsignal.cpp:100
#46 0x417642f3 in QSignal::activate (this=0x8720f78) at qsignal.cpp:212
#47 0x4185cb68 in QPopupMenu::mouseReleaseEvent (this=0x87204f0, 
e=0xbfffefe0) at qpopupmenu.cpp:1691
#48 0x40f16e0c in KPopupMenu::mouseReleaseEvent (this=0x87204f0, 
e=0xbfffefe0) 
at /data/development/sources/kde-head/kdelibs/kdeui/kpopupmenu.cpp:509
#49 0x4177f191 in QWidget::event (this=0x87204f0, e=0xbfffefe0) at 
qwidget.cpp:4676
#50 0x416e3d53 in QApplication::internalNotify (this=0x839fee0, 
receiver=0x87204f0, e=0xbfffefe0) at qapplication.cpp:2635
#51 0x416e3509 in QApplication::notify (this=0x839fee0, 
receiver=0x87204f0, e=0xbfffefe0) at qapplication.cpp:2421
#52 0x411f5eb0 in KApplication::notify (this=0x839fee0, 
receiver=0x87204f0, event=0xbfffefe0) 
at /data/development/sources/kde-head/kdelibs/kdecore/kapplication.cpp:549
#53 0x4167958f in QApplication::sendSpontaneousEvent 
(receiver=0x87204f0, event=0xbfffefe0) at qapplication.h:494
#54 0x41672258 in QETWidget::translateMouseEvent (this=0x87204f0, 
event=0xbffff370) at qapplication_x11.cpp:4233
#55 0x41670139 in QApplication::x11ProcessEvent (this=0x839fee0, 
event=0xbffff370) at qapplication_x11.cpp:3442
#56 0x4168a874 in QEventLoop::processEvents (this=0x8422b88, flags=4) at 
qeventloop_x11.cpp:192
#57 0x416f7fc2 in QEventLoop::enterLoop (this=0x8422b88) at 
qeventloop.cpp:198
#58 0x416f7ede in QEventLoop::exec (this=0x8422b88) at 
qeventloop.cpp:145
#59 0x416e3ed3 in QApplication::exec (this=0x839fee0) at 
qapplication.cpp:2758
#60 0x080ae039 in main (argc=1, argv=0xbffff604) 
at /home/andris/development/sources/kde-head/kdewebdev/quanta/src/main.cpp:212
-- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050301/4db45a7b/attachment.sig>


More information about the kde-core-devel mailing list