Bug 334785

Summary: First Plasma, then KWin, then Dolphin crashed
Product: [Applications] dolphin Reporter: Mark Szentes-Wanner <mark>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: 4.13.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mark Szentes-Wanner 2014-05-14 21:02:31 UTC
Application: dolphin (4.13.0)
KDE Platform Version: 4.13.0
Qt Version: 4.8.6
Operating System: Linux 3.13.0-24-generic x86_64
Distribution: Ubuntu 14.04 LTS

-- Information about the crash:
- What I was doing when the application crashed:

First Plasma, then KWin, then Dolphin crashed

I have no idea, why this happened.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f7dff5147c0 (LWP 2841))]

Thread 4 (Thread 0x7f7de14ef700 (LWP 2842)):
#0  0x00007f7dfedcffbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f7df5d40fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f7df5d410ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7dfae407be in QEventDispatcherGlib::processEvents (this=0x7f7ddc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007f7dfae120af in QEventLoop::processEvents (this=this@entry=0x7f7de14eede0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f7dfae123a5 in QEventLoop::exec (this=this@entry=0x7f7de14eede0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f7dfad0ec5f in QThread::exec (this=this@entry=0x16eeea0) at thread/qthread.cpp:537
#7  0x00007f7dfadf3823 in QInotifyFileSystemWatcherEngine::run (this=0x16eeea0) at io/qfilesystemwatcher_inotify.cpp:265
#8  0x00007f7dfad1132f in QThreadPrivate::start (arg=0x16eeea0) at thread/qthread_unix.cpp:349
#9  0x00007f7df6220182 in start_thread (arg=0x7f7de14ef700) at pthread_create.c:312
#10 0x00007f7dfeddd30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f7de0be6700 (LWP 2843)):
#0  0x00007f7dfedcffbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f7df5d40fe4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f7df5d410ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7dfae407be in QEventDispatcherGlib::processEvents (this=0x7f7dd40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#4  0x00007f7dfae120af in QEventLoop::processEvents (this=this@entry=0x7f7de0be5e20, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f7dfae123a5 in QEventLoop::exec (this=this@entry=0x7f7de0be5e20, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f7dfad0ec5f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:537
#7  0x00007f7dfad1132f in QThreadPrivate::start (arg=0x1b31720) at thread/qthread_unix.cpp:349
#8  0x00007f7df6220182 in start_thread (arg=0x7f7de0be6700) at pthread_create.c:312
#9  0x00007f7dfeddd30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f7ddbb8e700 (LWP 2844)):
#0  0x00007f7dfae40b2a in testAndSetOrdered (newValue=1, expectedValue=0, this=0x1b68340) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:145
#1  testAndSetAcquire (newValue=1, expectedValue=0, this=0x1b68340) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:267
#2  tryLockInline (this=0x1b682f8) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:181
#3  lockInline (this=0x1b682f8) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:189
#4  QMutexLocker (m=0x1b682f8, this=<synthetic pointer>) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:109
#5  canWaitLocked (this=0x1b682b0) at ../../include/QtCore/private/../../../src/corelib/thread/qthread_p.h:228
#6  postEventSourcePrepare (s=0x7f7dd0001350, timeout=0x7f7ddbb8dc24) at kernel/qeventdispatcher_glib.cpp:270
#7  0x00007f7df5d4068d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007f7df5d40f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007f7df5d410ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007f7dfae407be in QEventDispatcherGlib::processEvents (this=0x7f7dd00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#11 0x00007f7dfae120af in QEventLoop::processEvents (this=this@entry=0x7f7ddbb8dde0, flags=...) at kernel/qeventloop.cpp:149
#12 0x00007f7dfae123a5 in QEventLoop::exec (this=this@entry=0x7f7ddbb8dde0, flags=...) at kernel/qeventloop.cpp:204
#13 0x00007f7dfad0ec5f in QThread::exec (this=this@entry=0x1b668d0) at thread/qthread.cpp:537
#14 0x00007f7dfadf3823 in QInotifyFileSystemWatcherEngine::run (this=0x1b668d0) at io/qfilesystemwatcher_inotify.cpp:265
#15 0x00007f7dfad1132f in QThreadPrivate::start (arg=0x1b668d0) at thread/qthread_unix.cpp:349
#16 0x00007f7df6220182 in start_thread (arg=0x7f7ddbb8e700) at pthread_create.c:312
#17 0x00007f7dfeddd30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f7dff5147c0 (LWP 2841)):
[KCrash Handler]
#6  QHash<QGraphicsItem*, QHashDummyValue>::detach_helper (this=this@entry=0x1b3a450) at ../../include/QtCore/../../src/corelib/tools/qhash.h:584
#7  0x00007f7dfbdf2505 in detach (this=0x1b3a450) at ../../include/QtCore/../../src/corelib/tools/qhash.h:303
#8  insert (avalue=..., akey=@0x7fff4cc84c58: 0x1efc770, this=0x1b3a450) at ../../include/QtCore/../../src/corelib/tools/qhash.h:756
#9  insert (value=@0x7fff4cc84c58: 0x1efc770, this=0x1b3a450) at ../../include/QtCore/../../src/corelib/tools/qset.h:181
#10 operator<< (value=@0x7fff4cc84c58: 0x1efc770, this=0x1b3a450) at ../../include/QtCore/../../src/corelib/tools/qset.h:201
#11 QGraphicsSceneBspTreeIndexPrivate::removeItem (this=0x1b3a300, item=0x1efc770, recursive=<optimized out>, moveToUnindexedItems=<optimized out>) at graphicsview/qgraphicsscenebsptreeindex.cpp:353
#12 0x00007f7dfbddfb2e in QGraphicsScenePrivate::removeItemHelper (this=0x1b39f90, item=item@entry=0x1efc770) at graphicsview/qgraphicsscene.cpp:591
#13 0x00007f7dfbdb977e in QGraphicsItem::~QGraphicsItem (this=0x1efc770, __in_chrg=<optimized out>) at graphicsview/qgraphicsitem.cpp:1498
#14 0x00007f7dfbe08226 in ~QGraphicsObject (this=0x1efc760, __in_chrg=<optimized out>) at ../../include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:547
#15 QGraphicsWidget::~QGraphicsWidget (this=0x1efc760, __in_chrg=<optimized out>) at graphicsview/qgraphicswidget.cpp:232
#16 0x00007f7dfe11d439 in KItemListSelectionToggle::~KItemListSelectionToggle() () from /usr/lib/libdolphinprivate.so.4
#17 0x00007f7dfe109cdc in KItemListWidget::slotHoverAnimationFinished() () from /usr/lib/libdolphinprivate.so.4
#18 0x00007f7dfae2787a in QMetaObject::activate (sender=sender@entry=0x1d64e60, m=m@entry=0x7f7dfb171de0 <QAbstractAnimation::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3539
#19 0x00007f7dfacf4670 in QAbstractAnimation::finished (this=this@entry=0x1d64e60) at .moc/release-shared/moc_qabstractanimation.cpp:189
#20 0x00007f7dfacf4de0 in QAbstractAnimationPrivate::setState (this=0x1f13840, newState=newState@entry=QAbstractAnimation::Stopped) at animation/qabstractanimation.cpp:604
#21 0x00007f7dfacf4e97 in QAbstractAnimation::stop (this=this@entry=0x1d64e60) at animation/qabstractanimation.cpp:958
#22 0x00007f7dfacf4f9f in QAbstractAnimation::setCurrentTime (this=this@entry=0x1d64e60, msecs=<optimized out>) at animation/qabstractanimation.cpp:912
#23 0x00007f7dfacf5124 in QUnifiedTimer::updateAnimationsTime (this=0x18a71f0) at animation/qabstractanimation.cpp:235
#24 0x00007f7dfacf6121 in QAnimationDriver::advance (this=<optimized out>) at animation/qabstractanimation.cpp:443
#25 0x00007f7dfae2ba31 in QObject::event (this=0x18a7208, e=<optimized out>) at kernel/qobject.cpp:1156
#26 0x00007f7dfb805e2c in QApplicationPrivate::notify_helper (this=this@entry=0x1617450, receiver=receiver@entry=0x18a7208, e=e@entry=0x7fff4cc85360) at kernel/qapplication.cpp:4567
#27 0x00007f7dfb80c4a0 in QApplication::notify (this=this@entry=0x7fff4cc85700, receiver=receiver@entry=0x18a7208, e=e@entry=0x7fff4cc85360) at kernel/qapplication.cpp:4353
#28 0x00007f7dfc510baa in KApplication::notify (this=0x7fff4cc85700, receiver=0x18a7208, event=0x7fff4cc85360) at ../../kdeui/kernel/kapplication.cpp:311
#29 0x00007f7dfae134dd in QCoreApplication::notifyInternal (this=0x7fff4cc85700, receiver=0x18a7208, event=0x7fff4cc85360) at kernel/qcoreapplication.cpp:953
#30 0x00007f7dfae43323 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#31 QTimerInfoList::activateTimers (this=0x16132f0) at kernel/qeventdispatcher_unix.cpp:621
#32 0x00007f7dfae40629 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:193
#33 idleTimerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:240
#34 0x00007f7df5d40e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f7df5d41048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f7df5d410ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f7dfae407a1 in QEventDispatcherGlib::processEvents (this=0x15e2a00, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#38 0x00007f7dfb8a7bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007f7dfae120af in QEventLoop::processEvents (this=this@entry=0x7fff4cc855d0, flags=...) at kernel/qeventloop.cpp:149
#40 0x00007f7dfae123a5 in QEventLoop::exec (this=this@entry=0x7fff4cc855d0, flags=...) at kernel/qeventloop.cpp:204
#41 0x00007f7dfae17b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#42 0x00007f7dff0f84f7 in kdemain () from /usr/lib/kde4/libkdeinit/libkdeinit4_dolphin.so
#43 0x00007f7dfed03ec5 in __libc_start_main (main=0x4006d0, argc=6, argv=0x7fff4cc85838, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff4cc85828) at libc-start.c:287
#44 0x00000000004006fe in _start ()

Reported using DrKonqi
Comment 1 Frank Reininghaus 2014-05-16 12:22:07 UTC
Thanks for the bug report! The backtrace doesn't really tell much about the cause of the crash. It could be a problem in QGraphicsView itself, or an invalid memory access in Dolphin or somewhere else. In principle, the best way to find out more about the problem would be a Valgrind log (see http://community.kde.org/Dolphin/FAQ/Crashes), but this is basically impossible to get if the crash occurs only randomly and rarely.

One thing that we could do would be to replace the "delete m_selectionToggle" in KItemListWidget::slotHoverAnimationFinished(), which calls the crashing code, by a deleteLater(). I'm not sure if it will really fix the problem though.
Comment 2 Frank Reininghaus 2014-11-09 17:11:49 UTC
Git commit 1938ad54d4ee640f04d24bad3b690095bc9b8668 by Frank Reininghaus.
Committed on 09/11/2014 at 17:08.
Pushed by freininghaus into branch 'Applications/14.12'.

Use deleteLater() to delete the selection toggle in KItemListWidget

This patch should make a crash with a backtrace as provided in the bug
report impossible. I'm not sure if this would really prevent the crash
- it looks like the actual cause of the problem could be in
QGraphicsView or anywhere else, but it's hard to tell because the bug
was reported just once and does not seem reproducible. But I'm pretty
sure that this change doesn't make anything worse.
REVIEW: 121087

M  +1    -1    dolphin/src/kitemviews/kitemlistwidget.cpp

http://commits.kde.org/kde-baseapps/1938ad54d4ee640f04d24bad3b690095bc9b8668