Application: krita (2.7 Pre-Alpha) KDE Platform Version: 4.10.2 "release 556" Qt Version: 4.8.4 Operating System: Linux 3.7.10-1.1-desktop x86_64 Distribution: "openSUSE 12.3 (x86_64)" -- Information about the crash: Try to import an svg and -- poof, in the destructor of karbon. Probably because of zagge's refactoring we shouldn't delete the shapes there. The crash can be reproduced every time. -- Backtrace: Application: Krita (krita), signal: Segmentation fault Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7fce4b022780 (LWP 15620))] Thread 6 (Thread 0x7fce2ddb4700 (LWP 15621)): #0 0x00007fce4a161964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007fce4a3f462b in wait (time=18446744073709551615, this=0x38a3320) at thread/qwaitcondition_unix.cpp:86 #2 QWaitCondition::wait (this=<optimized out>, mutex=0x38a32d0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158 #3 0x00007fce4a3f0537 in QSemaphore::acquire (this=0x38a3090, n=1) at thread/qsemaphore.cpp:144 #4 0x00007fce49508204 in waitForWork (this=0x38a3080) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162 #5 KisTileDataPooler::run (this=0x38a3080) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184 #6 0x00007fce4a3f40cc in QThreadPrivate::start (arg=0x38a3080) at thread/qthread_unix.cpp:338 #7 0x00007fce4a15de0f in start_thread () from /lib64/libpthread.so.0 #8 0x00007fce418cc7dd in clone () from /lib64/libc.so.6 Thread 5 (Thread 0x7fce2d5b3700 (LWP 15622)): #0 0x00007fce4a161964 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007fce4a3f462b in wait (time=18446744073709551615, this=0x38a36b0) at thread/qwaitcondition_unix.cpp:86 #2 QWaitCondition::wait (this=<optimized out>, mutex=0x38a3660, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158 #3 0x00007fce4a3f0908 in QSemaphore::tryAcquire (this=0x38a3390, n=1, timeout=<optimized out>) at thread/qsemaphore.cpp:221 #4 0x00007fce49535c4a in KisTileDataSwapper::run (this=0x38a30b8) at /home/boud/kde/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92 #5 0x00007fce4a3f40cc in QThreadPrivate::start (arg=0x38a30b8) at thread/qthread_unix.cpp:338 #6 0x00007fce4a15de0f in start_thread () from /lib64/libpthread.so.0 #7 0x00007fce418cc7dd in clone () from /lib64/libc.so.6 Thread 4 (Thread 0x7fce26ffd700 (LWP 15627)): #0 0x00007fce418c5623 in select () from /lib64/libc.so.6 #1 0x00007fce4a51b603 in qt_safe_select (nfds=27, fdread=0x7fce10000ac8, fdwrite=0x7fce10000d60, fdexcept=0x7fce10000ff8, orig_timeout=0x0) at kernel/qcore_unix.cpp:83 #2 0x00007fce4a520099 in QEventDispatcherUNIXPrivate::doSelect (this=this@entry=0x7fce10000910, flags=..., timeout=0x0) at kernel/qeventdispatcher_unix.cpp:223 #3 0x00007fce4a521162 in QEventDispatcherUNIX::processEvents (this=0x7fce100008f0, flags=...) at kernel/qeventdispatcher_unix.cpp:952 #4 0x00007fce4a4ee9ef in QEventLoop::processEvents (this=this@entry=0x7fce26ffcdd0, flags=...) at kernel/qeventloop.cpp:149 #5 0x00007fce4a4eec78 in QEventLoop::exec (this=0x7fce26ffcdd0, flags=...) at kernel/qeventloop.cpp:204 #6 0x00007fce4a3f10f0 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542 #7 0x00007fce4a4cf1af in QInotifyFileSystemWatcherEngine::run (this=0x3d50620) at io/qfilesystemwatcher_inotify.cpp:256 #8 0x00007fce4a3f40cc in QThreadPrivate::start (arg=0x3d50620) at thread/qthread_unix.cpp:338 #9 0x00007fce4a15de0f in start_thread () from /lib64/libpthread.so.0 #10 0x00007fce418cc7dd in clone () from /lib64/libc.so.6 Thread 3 (Thread 0x7fce277fe700 (LWP 15633)): #0 0x00007fce418c5623 in select () from /lib64/libc.so.6 #1 0x00007fce4a4ce7e2 in QProcessManager::run (this=0x7fce4a84e4e0 <processManager()::processManager>) at io/qprocess_unix.cpp:245 #2 0x00007fce4a3f40cc in QThreadPrivate::start (arg=0x7fce4a84e4e0 <processManager()::processManager>) at thread/qthread_unix.cpp:338 #3 0x00007fce4a15de0f in start_thread () from /lib64/libpthread.so.0 #4 0x00007fce418cc7dd in clone () from /lib64/libc.so.6 Thread 2 (Thread 0x7fce27fff700 (LWP 15644)): #0 0x00007fce4a161d11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007fce4a3f4587 in wait (time=30000, this=0x4536700) at thread/qwaitcondition_unix.cpp:84 #2 QWaitCondition::wait (this=<optimized out>, mutex=0x4544568, time=30000) at thread/qwaitcondition_unix.cpp:158 #3 0x00007fce4a3e7d8f in QThreadPoolThread::run (this=0x45e3ca0) at concurrent/qthreadpool.cpp:141 #4 0x00007fce4a3f40cc in QThreadPrivate::start (arg=0x45e3ca0) at thread/qthread_unix.cpp:338 #5 0x00007fce4a15de0f in start_thread () from /lib64/libpthread.so.0 #6 0x00007fce418cc7dd in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7fce4b022780 (LWP 15620)): [KCrash Handler] #6 0x0000000000000021 in ?? () #7 0x00007fce33fe735e in qDeleteAll<QList<KoShape*>::const_iterator> (end=..., begin=...) at /usr/include/QtCore/qalgorithms.h:322 #8 qDeleteAll<QList<KoShape*> > (c=...) at /usr/include/QtCore/qalgorithms.h:330 #9 ~Private (this=0x429ba30, __in_chrg=<optimized out>) at /home/boud/kde/src/calligra/karbon/ui/KarbonDocument.cpp:113 #10 KarbonDocument::~KarbonDocument (this=0x4296c00, __in_chrg=<optimized out>) at /home/boud/kde/src/calligra/karbon/ui/KarbonDocument.cpp:175 #11 0x00007fce33fe7619 in KarbonDocument::~KarbonDocument (this=0x4296c00, __in_chrg=<optimized out>) at /home/boud/kde/src/calligra/karbon/ui/KarbonDocument.cpp:176 #12 0x00007fce4919273b in KoFilterChain::manageIO (this=this@entry=0x42d1850) at /home/boud/kde/src/calligra/libs/main/KoFilterChain.cpp:321 #13 0x00007fce49192c7d in KoFilterChain::invokeChain (this=0x42d1850) at /home/boud/kde/src/calligra/libs/main/KoFilterChain.cpp:96 #14 0x00007fce4918cc21 in KoFilterManager::importDocument (this=0x3f3d420, url=..., documentMimeType=..., status=@0x7fff3b8587a0: 998607600) at /home/boud/kde/src/calligra/libs/main/KoFilterManager.cpp:170 #15 0x00007fce49125439 in KoDocument::openFile (this=0x3fe7ce0) at /home/boud/kde/src/calligra/libs/main/KoDocument.cpp:1216 #16 0x00007fce491d71bd in KoPart::openFile (this=0x42be3f0) at /home/boud/kde/src/calligra/libs/main/KoPart.cpp:199 #17 0x00007fce48e81000 in KParts::ReadOnlyPartPrivate::openLocalFile (this=this@entry=0x42f3b30) at /usr/src/debug/kdelibs-4.10.2/kparts/part.cpp:591 #18 0x00007fce48e815a4 in KParts::ReadOnlyPart::openUrl (this=0x42be3f0, url=...) at /usr/src/debug/kdelibs-4.10.2/kparts/part.cpp:555 #19 0x00007fce49122c9e in KoDocument::openUrl (this=0x3fe7ce0, _url=...) at /home/boud/kde/src/calligra/libs/main/KoDocument.cpp:983 #20 0x00007fce4914ae05 in KoMainWindow::openDocumentInternal (this=this@entry=0x3916b50, url=..., newpart=0x42be3f0, newpart@entry=0x0, newdoc=0x3fe7ce0, newdoc@entry=0x0) at /home/boud/kde/src/calligra/libs/main/KoMainWindow.cpp:734 #21 0x00007fce4914d8ff in KoMainWindow::openDocument (this=this@entry=0x3916b50, url=...) at /home/boud/kde/src/calligra/libs/main/KoMainWindow.cpp:695 #22 0x00007fce4914dcff in KoMainWindow::slotFileOpen (this=this@entry=0x3916b50) at /home/boud/kde/src/calligra/libs/main/KoMainWindow.cpp:1303 #23 0x00007fce4915b81f in KoMainWindow::qt_static_metacall (_o=0x3916b50, _c=<optimized out>, _id=5, _a=0x7fff3b859380) at /home/boud/kde/build/calligra/libs/main/KoMainWindow.moc:113 #24 0x00007fce4a5051af in QMetaObject::activate (sender=0x3b8f6b0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff3b859380) at kernel/qobject.cpp:3548 #25 0x00007fce42f23662 in QAction::triggered (this=this@entry=0x3b8f6b0, _t1=false) at .moc/release-shared/moc_qaction.cpp:277 #26 0x00007fce42f23850 in QAction::activate (this=0x3b8f6b0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257 #27 0x00007fce42f239b7 in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1183 #28 0x00007fce43b63f57 in KAction::event (this=<optimized out>, event=0x7fff3b859930) at /usr/src/debug/kdelibs-4.10.2/kdeui/actions/kaction.cpp:131 #29 0x00007fce42f2986c in QApplicationPrivate::notify_helper (this=this@entry=0x26ccfc0, receiver=receiver@entry=0x3b8f6b0, e=e@entry=0x7fff3b859930) at kernel/qapplication.cpp:4562 #30 0x00007fce42f2dceb in QApplication::notify (this=0x7fff3b85ac60, receiver=0x3b8f6b0, e=0x7fff3b859930) at kernel/qapplication.cpp:4423 #31 0x00007fce49113d98 in KoApplication::notify (this=<optimized out>, receiver=0x3b8f6b0, event=0x7fff3b859930) at /home/boud/kde/src/calligra/libs/main/KoApplication.cpp:558 #32 0x00007fce4a4efc9e in QCoreApplication::notifyInternal (this=0x7fff3b85ac60, receiver=0x3b8f6b0, event=0x7fff3b859930) at kernel/qcoreapplication.cpp:946 #33 0x00007fce42f5a524 in sendEvent (event=0x7fff3b859930, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231 #34 QShortcutMap::dispatchEvent (this=this@entry=0x26cd0e0, e=e@entry=0x7fff3b859f10) at kernel/qshortcutmap.cpp:884 #35 0x00007fce42f5bb53 in QShortcutMap::tryShortcutEvent (this=0x26cd0e0, o=<optimized out>, e=0x7fff3b859f10) at kernel/qshortcutmap.cpp:364 #36 0x00007fce42f2f7ef in QApplication::notify (this=0x7fff3b85ac60, receiver=0x3c37da0, e=0x7fff3b859f10) at kernel/qapplication.cpp:3986 #37 0x00007fce49113d98 in KoApplication::notify (this=<optimized out>, receiver=0x3c37da0, event=0x7fff3b859f10) at /home/boud/kde/src/calligra/libs/main/KoApplication.cpp:558 #38 0x00007fce4a4efc9e in QCoreApplication::notifyInternal (this=0x7fff3b85ac60, receiver=0x3c37da0, event=0x7fff3b859f10) at kernel/qcoreapplication.cpp:946 #39 0x00007fce42fc5e8a in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0x3c37da0, grab=grab@entry=false, type=QEvent::KeyPress, code=79, modifiers=..., text=..., autorepeat=autorepeat@entry=false, count=1, nativeScanCode=32, nativeVirtualKey=111, nativeModifiers=4) at kernel/qkeymapper_x11.cpp:1866 #40 0x00007fce42fc62c1 in QKeyMapperPrivate::translateKeyEvent (this=0x2721240, keyWidget=0x3c37da0, event=0x7fff3b85a940, grab=false) at kernel/qkeymapper_x11.cpp:1836 #41 0x00007fce42fa39f8 in QApplication::x11ProcessEvent (this=0x7fff3b85ac60, event=0x7fff3b85a940) at kernel/qapplication_x11.cpp:3543 #42 0x00007fce42fca9d9 in QEventDispatcherX11::processEvents (this=0x24cac30, flags=...) at kernel/qeventdispatcher_x11.cpp:132 #43 0x00007fce4a4ee9ef in QEventLoop::processEvents (this=this@entry=0x7fff3b85abb0, flags=...) at kernel/qeventloop.cpp:149 #44 0x00007fce4a4eec78 in QEventLoop::exec (this=0x7fff3b85abb0, flags=...) at kernel/qeventloop.cpp:204 #45 0x00007fce4a4f3918 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218 #46 0x00007fce4aa35672 in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/calligra/krita/main.cc:79 #47 0x00007fce41805a15 in __libc_start_main () from /lib64/libc.so.6 #48 0x0000000000400a11 in _start () at ../sysdeps/x86_64/start.S:123 Reported using DrKonqi
Please note that the behavior of qDeleteAll() changed with Qt 4.8. It is no longer valid that items modify the list during qDeleteAll(), e.g. by removing themselves from the list in the destructor. If they still need to do, change the code not to use qDeleteAll(). For more information, see https://bugs.kde.org/show_bug.cgi?id=285938#c1 and linked commit and review request.
Thanks for the hint. That sounds pretty relevant!
Git commit 1c73799957c8af7690494009bb0047f05df40188 by Boudewijn Rempt. Committed on 25/04/2013 at 09:52. Pushed by rempt into branch 'master'. Don't crash on closing karbon (or importing an svg in Krita) Related: bug 318777 M +0 -2 karbon/ui/KarbonDocument.cpp http://commits.kde.org/calligra/1c73799957c8af7690494009bb0047f05df40188