Application that crashed: plasma-desktop Version of the application: 0.3 KDE Version: 4.2.90 (KDE 4.2.90 (KDE 4.3 Beta2)) Qt Version: 4.5.1 Operating System: Linux 2.6.28-12-generic i686 Distribution: Ubuntu 9.04 What I was doing when the application crashed: Plasma just crashed while closing konqueor window, after changing browser identificatiion. -- Backtrace: Application: Plasma Workspace (kdeinit), signal: Segmentation fault [Current thread is 0 (LWP 3123)] Thread 4 (Thread 0xa8583b90 (LWP 3126)): #0 0xb7f64430 in __kernel_vsyscall () #1 0xb64600e5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb66402ed in pthread_cond_wait () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7d685b2 in QWaitCondition::wait (this=0x8ea1440, mutex=0x8ea143c, time=4294967295) at thread/qwaitcondition_unix.cpp:87 #4 0xb76acae2 in QHostInfoAgent::run (this=0x8ea1430) at kernel/qhostinfo.cpp:260 #5 0xb7d6756e in QThreadPrivate::start (arg=0x8ea1430) at thread/qthread_unix.cpp:189 #6 0xb645c4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #7 0xb663149e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 3 (Thread 0xa369db90 (LWP 3128)): #0 0xb7f64430 in __kernel_vsyscall () #1 0xb6460412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb6640344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7d66f59 in thread_sleep (ti=0xa369d2b0) at thread/qthread_unix.cpp:298 #4 0xb7d6708b in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:324 #5 0xa8800138 in Update_Thread::run () from /usr/lib/kde4/plasma_applet_cwp.so #6 0xb7d6756e in QThreadPrivate::start (arg=0x98ca6a0) at thread/qthread_unix.cpp:189 #7 0xb645c4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #8 0xb663149e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 2 (Thread 0xa3fa3b90 (LWP 12617)): #0 0xb7f64430 in __kernel_vsyscall () #1 0xb6460412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb6640344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6 #3 0xb7d66f59 in thread_sleep (ti=0xa3fa32b0) at thread/qthread_unix.cpp:298 #4 0xb7d6708b in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:324 #5 0xa8800138 in Update_Thread::run () from /usr/lib/kde4/plasma_applet_cwp.so #6 0xb7d6756e in QThreadPrivate::start (arg=0x8fa3e10) at thread/qthread_unix.cpp:189 #7 0xb645c4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #8 0xb663149e in clone () from /lib/tls/i686/cmov/libc.so.6 Thread 1 (Thread 0xb5f6aa10 (LWP 3123)): [KCrash Handler] #6 KDirLister::directories (this=0x1) at /usr/include/qt4/QtCore/qlist.h:111 #7 0xb5c292f7 in KFilePreviewGenerator::Private::updateCutItems (this=0x8f4f430) at /build/buildd/kde4libs-4.2.90/kfile/kfilepreviewgenerator.cpp:643 #8 0xb5c29f9e in KFilePreviewGenerator::qt_metacall (this=0x8f4f348, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfd7dcc8) at /build/buildd/kde4libs-4.2.90/obj-i486-linux-gnu/kfile/kfilepreviewgenerator.moc:89 #9 0xb7e71a58 in QMetaObject::activate (sender=0x8acb408, from_signal_index=7, to_signal_index=7, argv=0x0) at kernel/qobject.cpp:3120 #10 0xb7e726e2 in QMetaObject::activate (sender=0x8acb408, m=0xb7199548, local_signal_index=3, argv=0x0) at kernel/qobject.cpp:3194 #11 0xb6faddf7 in QClipboard::dataChanged (this=0x8acb408) at .moc/release-shared/moc_qclipboard.cpp:108 #12 0xb696db7d in QApplication::x11ProcessEvent (this=0x8a1ecb8, event=0xbfd7f22c) at kernel/qapplication_x11.cpp:3400 #13 0xb699906a in x11EventSourceDispatch (s=0x8a526b0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146 #14 0xb64a9b88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #15 0xb64ad0eb in ?? () from /usr/lib/libglib-2.0.so.0 #16 0xb64ad268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #17 0xb7e871d8 in QEventDispatcherGlib::processEvents (this=0x8a4f150, flags={i = -1076366360}) at kernel/qeventdispatcher_glib.cpp:324 #18 0xb6998765 in QGuiEventDispatcherGlib::processEvents (this=0x8a4f150, flags={i = -1076366312}) at kernel/qguieventdispatcher_glib.cpp:202 #19 0xb7e59dda in QEventLoop::processEvents (this=0xbfd7f490, flags={i = -1076366248}) at kernel/qeventloop.cpp:149 #20 0xb7e5a21a in QEventLoop::exec (this=0xbfd7f490, flags={i = -1076366184}) at kernel/qeventloop.cpp:200 #21 0xb7e5c6c9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888 #22 0xb68f6a47 in QApplication::exec () at kernel/qapplication.cpp:3526 #23 0xb3cfb820 in kdemain (argc=1, argv=0x89e7b40) at /build/buildd/kdebase-workspace-4.2.90/plasma/shells/desktop/main.cpp:50 #24 0x0804e1c0 in launch (argc=1, _name=0x8a23204 "/usr/bin/plasma-desktop", args=0x8a2321c "", cwd=0x0, envc=0, envs=0x8a23220 "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x80512d0 "0") at /build/buildd/kde4libs-4.2.90/kinit/kinit.cpp:671 #25 0x0804e99d in handle_launcher_request (sock=7, who=<value optimized out>) at /build/buildd/kde4libs-4.2.90/kinit/kinit.cpp:1163 #26 0x0804ef25 in handle_requests (waitForPid=0) at /build/buildd/kde4libs-4.2.90/kinit/kinit.cpp:1356 #27 0x0804fb0a in main (argc=2, argv=0xbfd7fc84, envp=0xbfd7fc90) at /build/buildd/kde4libs-4.2.90/kinit/kinit.cpp:1783 Reported using DrKonqi
From "KFilePreviewGenerator::Private::updateCutItems": " KDirLister* dirLister = m_dirModel->dirLister(); const KUrl::List dirs = dirLister->directories(); " Crash
*** Bug 197304 has been marked as a duplicate of this bug. ***
*** Bug 198449 has been marked as a duplicate of this bug. ***
*** Bug 200222 has been marked as a duplicate of this bug. ***
*** Bug 203340 has been marked as a duplicate of this bug. ***
*** Bug 198896 has been marked as a duplicate of this bug. ***
*** Bug 204786 has been marked as a duplicate of this bug. ***
*** Bug 205034 has been marked as a duplicate of this bug. ***
*** Bug 205096 has been marked as a duplicate of this bug. ***
*** Bug 205965 has been marked as a duplicate of this bug. ***
*** Bug 206118 has been marked as a duplicate of this bug. ***
*** Bug 207411 has been marked as a duplicate of this bug. ***
*** Bug 207895 has been marked as a duplicate of this bug. ***
*** Bug 209407 has been marked as a duplicate of this bug. ***
*** Bug 211102 has been marked as a duplicate of this bug. ***
*** Bug 212423 has been marked as a duplicate of this bug. ***
*** Bug 213357 has been marked as a duplicate of this bug. ***
*** Bug 213391 has been marked as a duplicate of this bug. ***
*** Bug 213632 has been marked as a duplicate of this bug. ***
*** Bug 213999 has been marked as a duplicate of this bug. ***
*** Bug 214066 has been marked as a duplicate of this bug. ***
*** Bug 214319 has been marked as a duplicate of this bug. ***
*** Bug 216965 has been marked as a duplicate of this bug. ***
*** Bug 218605 has been marked as a duplicate of this bug. ***
*** Bug 218893 has been marked as a duplicate of this bug. ***
*** Bug 219936 has been marked as a duplicate of this bug. ***
*** Bug 220742 has been marked as a duplicate of this bug. ***
*** Bug 221130 has been marked as a duplicate of this bug. ***
*** Bug 221060 has been marked as a duplicate of this bug. ***
*** Bug 223637 has been marked as a duplicate of this bug. ***
*** Bug 225464 has been marked as a duplicate of this bug. ***
*** Bug 228566 has been marked as a duplicate of this bug. ***
So far, nobody experienced this crash on KDE SC 4.3.86+; we could wait a bit more and consider this fixed. (if no new cases appear)
Actually, bug 221060 was on KDE 4.3.86
With my "4.3.86+" I wanted to mean ">4.3.86", sorry about the confusion.
I used to experience this bug quite frequently, and it has completely vanished for me since KDE SC 4.4.0.
Assume it is fixed since KDE SC 4.4.0.
*** Bug 229196 has been marked as a duplicate of this bug. ***
Created attachment 41505 [details] New crash information added by DrKonqi I've got this error on KDE SC 4.4.1. I think it's the same bug but a developer should have a look. At least, I can read the same methods mentioned in the bug report on my stack trace.
Reopen cause of comment #39 which has the backtrace on KDE 4.4.1 with Qt 4.6.2
Created attachment 41527 [details] patch that should help to figure out what goes wrong This patch does introduce a Q_ASSERT that should assert if the KDirModel gets destroyed while the KFilePreviewGenerator is still alive and still holds a pointer to the KDirModel (which is not set to NULL what would result in a dangling pointer what would explain the crash). The patch can be applied with cd /path/to/sourcecode/KDE/kdelibs && patch -p0 < ug196681.patch && cd /path/to/builddir/KDE/kdelibs/kfile && make install If the assert shows up Dr. Konqi allows to generate a backtrace. That backtrace would then show who deletes the KDirModel what we could fix then.
this is a bug in kfile, let's put it there. personally, i'd suggest a QWeakPointer around the m_dirModel and checking it before use in all cases. m_dirModel can also be NULL on line 441, yet the connection: QClipboard* clipboard = QApplication::clipboard(); connect(clipboard, SIGNAL(dataChanged()), q, SLOT(updateCutItems())); is made regardless of this, and updateCutItems expects m_dirModel to be valid. that connection should perhaps be only made when m_dirModel. i'm CC'ing David as this is much more his sort of territory of expertise than mine :)
This is actually Peter's code :-)
*** Bug 231046 has been marked as a duplicate of this bug. ***
*** Bug 231194 has been marked as a duplicate of this bug. ***
Created attachment 41811 [details] backtrace that happens with patch from Comment #41
Created attachment 41812 [details] patch for kfile/kfilepreviewgenerator.cpp that should solve the problem
*** Bug 231830 has been marked as a duplicate of this bug. ***
So, did anyone run this in valgrind to find out why/where the dirmodel was being deleted? It sounds very wrong to me that the KFilePreviewGenerator would outlive the dirmodel, and the suggested fix is just a workaround IMHO.
Sorry for the late reply, I was not aware that there are so many duplicates for this issue. I agree with David that the suggested fix seems to be only a workaround, the model may not get deleted during the KFilePreviewGenerator (~controller/view) is still working on it. I've reassigned this issue to me. I hope I've time during the next week for having a look on it. If anybody in the meantime has found out, who deletes the model, then of course this would be very welcome :-)
*** Bug 231984 has been marked as a duplicate of this bug. ***
*** Bug 232719 has been marked as a duplicate of this bug. ***
*** Bug 233748 has been marked as a duplicate of this bug. ***
*** Bug 234094 has been marked as a duplicate of this bug. ***
*** Bug 234317 has been marked as a duplicate of this bug. ***
*** Bug 234640 has been marked as a duplicate of this bug. ***
*** Bug 234708 has been marked as a duplicate of this bug. ***
*** Bug 234699 has been marked as a duplicate of this bug. ***
Created attachment 43020 [details] New crash information added by DrKonqi There is no obvious reason but -perhaps- intensive memory use as I have Konqueror with more than 20 tabs, talking via Skype + Kopete with Amarok and Kontact in background... I wasn't doing anything in particular when the crash happened.
*** Bug 236939 has been marked as a duplicate of this bug. ***
*** Bug 236831 has been marked as a duplicate of this bug. ***
*** Bug 240199 has been marked as a duplicate of this bug. ***
@Peter Penz: if this hasn't already been fixed in trunk, would you be alright with committing the workaround (though using a QWeakPointer rather than a QPointer :) at least for 4.5? getting rid of a crash, even if by work-around, is better than waiting on the right fix while shipping a known crasher again imho.
*** Bug 241243 has been marked as a duplicate of this bug. ***
*** Bug 242992 has been marked as a duplicate of this bug. ***
*** Bug 244786 has been marked as a duplicate of this bug. ***
*** Bug 245493 has been marked as a duplicate of this bug. ***
*** Bug 246299 has been marked as a duplicate of this bug. ***
Created attachment 50119 [details] New crash information added by DrKonqi plasma-desktop (0.3) on KDE Platform 4.5.00 (KDE 4.5.0) using Qt 4.7.0 - What I was doing when the application crashed: I was browsing the internet with chromium. - Unusual behavior I noticed: Immediately before the plasma crash, I was notified by tray notifier that the indexing service (perhaps strigi) was temporary interrupted. unfortunately, some crash perhaps involve this notifier, because i can't see the related message within history. -- Backtrace (Reduced): #7 0xb726a1aa in KDirModel::dirLister (this=0x8462488) at ../../kio/kio/kdirmodel.cpp:358 #8 0xb3c2b776 in KFilePreviewGenerator::qt_metacall (this=0x9b70c68, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbf8f2e6c) at ./kfilepreviewgenerator.moc:97 [...] [...] #11 0xb63a4c87 in QClipboard::dataChanged (this=0x8412128) at .moc/release-shared/moc_qclipboard.cpp:114 #12 0xb5cd5bf4 in QApplication::x11ProcessEvent (this=0x840ca08, event=0xbf8f323c) at kernel/qapplication_x11.cpp:3370 #13 0xb5d04b3a in x11EventSourceDispatch (s=0x841b0f0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
*** Bug 249042 has been marked as a duplicate of this bug. ***
*** Bug 250334 has been marked as a duplicate of this bug. ***
@Aaron (in reply to comment #63): Sorry for the late reply - yes, applying the workaround is OK for me. I'm currently on vacation and cannot apply the patch from Sebastian, it would be great if someone else can commit the patch (I hope I find the time to fix this in a cleaner way for 4.6...) Thanks!
SVN commit 1176325 by ppenz: KDirModel takes ownership of the directory lister, so don't delete the directory lister manually. BUG: 196681 M +1 -2 dolphinpart.cpp M +1 -8 dolphinviewcontainer.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176325
SVN commit 1176328 by ppenz: Applications may not delete the directory model before deleting the KFilePreviewGenerator instance. However it is very easy for applications to violate this, so instead of crashing provide a warning for the application developer. Thanks a lot to Sebastian Sauer for the investigations and the patch! CCBUG: 196681 M +7 -1 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176328
SVN commit 1176329 by ppenz: Backport of SVN commit 1176328: Applications may not delete the directory model before deleting the KFilePreviewGenerator instance. However it is very easy for applications to violate this, so instead of crashing provide a warning for the application developer. Thanks a lot to Sebastian Sauer for the investigations and the patch! CCBUG: 196681 FIXED-IN: 4.5.2 M +7 -1 kfilepreviewgenerator.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1176329
Great work, Peter and Sebastian! I hope that this one stays closed this time.
*** Bug 251587 has been marked as a duplicate of this bug. ***
*** Bug 253825 has been marked as a duplicate of this bug. ***
*** Bug 254499 has been marked as a duplicate of this bug. ***
*** Bug 256556 has been marked as a duplicate of this bug. ***
*** Bug 256977 has been marked as a duplicate of this bug. ***
*** Bug 257112 has been marked as a duplicate of this bug. ***
*** Bug 257066 has been marked as a duplicate of this bug. ***
*** Bug 259560 has been marked as a duplicate of this bug. ***
*** Bug 261338 has been marked as a duplicate of this bug. ***
*** Bug 261822 has been marked as a duplicate of this bug. ***
*** Bug 262534 has been marked as a duplicate of this bug. ***
*** Bug 264137 has been marked as a duplicate of this bug. ***
*** Bug 265146 has been marked as a duplicate of this bug. ***
*** Bug 268769 has been marked as a duplicate of this bug. ***