Application: kompare (4.0.0) KDE Platform Version: 4.4.5 (KDE 4.4.5) Qt Version: 4.6.3 Operating System: Linux 2.6.35.8 x86_64 Distribution: Debian GNU/Linux unstable (sid) -- Information about the crash: I was checking a diff between Koffice 2.3 beta3 and koffice 2.3 beta4. I had checked about 75% of the full diff. I had used ctrl-down/pgdown to advance among items. At a certain file, I pressed ctrl-PgDown again and kompare crashed. -- Backtrace: Application: Kompare (kompare), signal: Segmentation fault [KCrash Handler] #5 0x00007f052cb99521 in begin (this=0x6259830, changesList=0xc24fa0, diffToChangeItemDict=0xc19280) at /usr/include/qt4/QtCore/qlist.h:93 #6 constBegin (this=0x6259830, changesList=0xc24fa0, diffToChangeItemDict=0xc19280) at /usr/include/qt4/QtCore/qlist.h:250 #7 KFileLVI::fillChangesList (this=0x6259830, changesList=0xc24fa0, diffToChangeItemDict=0xc19280) at ../../../kompare/komparenavtreepart/komparenavtreepart.cpp:599 #8 0x00007f052cb99770 in KompareNavTreePart::setSelectedFile (this=0xc19250, model=<value optimized out>) at ../../../kompare/komparenavtreepart/komparenavtreepart.cpp:315 #9 0x00007f052cb99952 in KompareNavTreePart::slotSetSelection (this=0xc19250, model=0x1bc0880, diff=0x1bc0b00) at ../../../kompare/komparenavtreepart/komparenavtreepart.cpp:275 #10 0x00007f052cb99dea in KompareNavTreePart::qt_metacall (this=0xc19250, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc4482690) at ./komparenavtreepart.moc:105 #11 0x00007f053a3e02e6 in QMetaObject::activate (sender=0xb72260, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3a) at kernel/qobject.cpp:3295 #12 0x00007f052db1f54b in KomparePart::setSelection (this=0x0, _t1=0x1bc0880, _t2=0x1bc0b00) at ./kompare_part.moc:182 #13 0x00007f052db252a0 in KomparePart::qt_metacall (this=0xb72260, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc44827f0) at ./kompare_part.moc:134 #14 0x00007f053a3e02e6 in QMetaObject::activate (sender=0xbc6ce0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3a) at kernel/qobject.cpp:3295 #15 0x00007f052d8c51ab in Diff2::KompareModelList::setSelection (this=0x0, _t1=0x1bc0880, _t2=0x1bc0b00) at ./komparemodellist.moc:198 #16 0x00007f052d8c6734 in Diff2::KompareModelList::slotNextModel (this=0xbc6ce0) at ../../../kompare/libdiff2/komparemodellist.cpp:727 #17 0x00007f052d8cdb71 in Diff2::KompareModelList::qt_metacall (this=0xbc6ce0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc4482970) at ./komparemodellist.moc:146 #18 0x00007f053a3e02e6 in QMetaObject::activate (sender=0xbc9a70, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x3a) at kernel/qobject.cpp:3295 #19 0x00007f053ad76132 in QAction::triggered (this=0x0, _t1=false) at .moc/release-shared/moc_qaction.cpp:263 #20 0x00007f053ad781ab in QAction::activate (this=0xbc9a70, event=<value optimized out>) at kernel/qaction.cpp:1255 #21 0x00007f053ad79ab7 in QAction::event (this=0x0, e=<value optimized out>) at kernel/qaction.cpp:1181 #22 0x00007f053b9bf9ad in KAction::event (this=0x0, event=0x7fffc4482fe0) at ../../kdeui/actions/kaction.cpp:129 #23 0x00007f053ad7c32c in QApplicationPrivate::notify_helper (this=0x867cf0, receiver=0xbc9a70, e=0x7fffc4482fe0) at kernel/qapplication.cpp:4302 #24 0x00007f053ad8280b in QApplication::notify (this=0x7fffc44847a0, receiver=0xbc9a70, e=0x7fffc4482fe0) at kernel/qapplication.cpp:4185 #25 0x00007f053ba94836 in KApplication::notify (this=0x7fffc44847a0, receiver=0xbc9a70, event=0x7fffc4482fe0) at ../../kdeui/kernel/kapplication.cpp:302 #26 0x00007f053a3cd09c in QCoreApplication::notifyInternal (this=0x7fffc44847a0, receiver=0xbc9a70, event=0x7fffc4482fe0) at kernel/qcoreapplication.cpp:726 #27 0x00007f053adb7f56 in sendEvent (this=<value optimized out>, e=0x7fffc44835e0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #28 QShortcutMap::dispatchEvent (this=<value optimized out>, e=0x7fffc44835e0) at kernel/qshortcutmap.cpp:879 #29 0x00007f053adb9d57 in QShortcutMap::tryShortcutEvent (this=0x867e18, o=<value optimized out>, e=0x7fffc44835e0) at kernel/qshortcutmap.cpp:364 #30 0x00007f053ad84368 in QApplication::notify (this=0x7fffc44847a0, receiver=0xc10010, e=0x7fffc44835e0) at kernel/qapplication.cpp:3748 #31 0x00007f053ba94836 in KApplication::notify (this=0x7fffc44847a0, receiver=0xc10010, event=0x7fffc44835e0) at ../../kdeui/kernel/kapplication.cpp:302 #32 0x00007f053a3cd09c in QCoreApplication::notifyInternal (this=0x7fffc44847a0, receiver=0xc10010, event=0x7fffc44835e0) at kernel/qcoreapplication.cpp:726 #33 0x00007f053ae26d6a in QKeyMapper::sendKeyEvent (keyWidget=0xc10010, grab=<value optimized out>, type=QEvent::KeyPress, code=16777239, modifiers=<value optimized out>, text=..., autorepeat=false, count=1, nativeScanCode=117, nativeVirtualKey=65366, nativeModifiers=4) at kernel/qkeymapper_x11.cpp:1875 #34 0x00007f053ae292e1 in QKeyMapperPrivate::translateKeyEvent (this=0x7fffc4483ac0, keyWidget=0xc10010, event=<value optimized out>, grab=false) at kernel/qkeymapper_x11.cpp:1845 #35 0x00007f053ae00a34 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffc4484190) at kernel/qapplication_x11.cpp:3406 #36 0x00007f053ae2c5a2 in x11EventSourceDispatch (s=0x86bb30, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #37 0x00007f05364f96f2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #38 0x00007f05364fd568 in ?? () from /lib/libglib-2.0.so.0 #39 0x00007f05364fd71c in g_main_context_iteration () from /lib/libglib-2.0.so.0 #40 0x00007f053a3f66b3 in QEventDispatcherGlib::processEvents (this=0x84ef80, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #41 0x00007f053ae2c19e in QGuiEventDispatcherGlib::processEvents (this=0x0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #42 0x00007f053a3cb9c2 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149 #43 0x00007f053a3cbd9c in QEventLoop::exec (this=0x7fffc44844b0, flags=) at kernel/qeventloop.cpp:201 #44 0x00007f053a3d0a2b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003 #45 0x000000000040a765 in main (argc=<value optimized out>, argv=<value optimized out>) at ../../kompare/main.cpp:228 Reported using DrKonqi
[Comment from a bug triager] This may be related to crashes in bug 202457. Regards
*** Bug 269177 has been marked as a duplicate of this bug. ***
Created attachment 59257 [details] A test patch for crashing kompare just type 'kompare cr.patch', press 'next-file' (I could not get it to work with just a removed file in the test patch)
Oh great, it did not save my comments :( Qt: 4.7.2 KDE Development Platform: 4.6.2 (4.6.2) Kompare: 4.0.0 from Fedora 15 pre-alpha, x64. I can create a stack-dump if you like (although without symbols as they would not load), but my example cr.patch file that reliably crashes kompare is probably much more useful.
*** Bug 273617 has been marked as a duplicate of this bug. ***
*** Bug 277050 has been marked as a duplicate of this bug. ***
Created attachment 61596 [details] Patch to prevent crash in this case
*** Bug 278951 has been marked as a duplicate of this bug. ***
I don't think the proposed patch is right. As I understand it, deleting tree widget items from slotSetSelection is unsafe with the new Qt 4 tree widgets, which explains why this started showing up when the KompareNavTreePart got ported to QTreeWidget. Now that I also ported the KomparePart to the Qt 4 QTreeWidget, we're seeing the same thing there, see bug #286086. Delaying the processing of slotSetSelection until the next event loop iteration should fix it, I'll have a fix shortly.
Removing CC, I'm already on kompare-devel.
So this one looks different from bug #286086 after all, maybe Konstantin's patch makes sense after all, I'll have to take a closer look.
*** This bug has been marked as a duplicate of bug 202457 ***