Bug 315298 - Dolphin crashes when trying to open non-existing volume
Summary: Dolphin crashes when trying to open non-existing volume
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: general (show other bugs)
Version: 2.1
Platform: Fedora RPMs Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2013-02-16 23:41 UTC by Jelle Geerts
Modified: 2013-02-18 23:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.10.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jelle Geerts 2013-02-16 23:41:01 UTC
Application: dolphin (2.1)
KDE Platform Version: 4.9.5
Qt Version: 4.8.4
Operating System: Linux 3.7.6-201.fc18.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
Steps I took:
1) Insert some USB storage device so that a mountable volume appears in the Dolphin 'Places' list.
2) Right-click the newly-appeared entry, and leave the menu open.
3) Disconnect the USB storage device.
4) Now choose "Open 'VolumeLabel' in New Tab".
5) Dolphin crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff365942880 (LWP 24382))]

Thread 2 (Thread 0x7ff358c9f700 (LWP 24384)):
#0  0x00000038ce7a6a01 in QTimerInfoList::updateCurrentTime() () from /lib64/libQtCore.so.4
#1  0x00000038ce7a6d43 in QTimerInfoList::timerWait(timeval&) () from /lib64/libQtCore.so.4
#2  0x00000038ce7a57ac in timerSourcePrepareHelper(GTimerSource*, int*) () from /lib64/libQtCore.so.4
#3  0x00000038ce7a5855 in timerSourcePrepare(_GSource*, int*) () from /lib64/libQtCore.so.4
#4  0x00000038c42475b8 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#5  0x00000038c4247c4b in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#6  0x00000038c4247e44 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#7  0x00000038ce7a60f6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#8  0x00000038ce7767df in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#9  0x00000038ce776a68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#10 0x00000038ce678950 in QThread::exec() () from /lib64/libQtCore.so.4
#11 0x00000038ce75700f in QInotifyFileSystemWatcherEngine::run() () from /lib64/libQtCore.so.4
#12 0x00000038ce67b92c in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#13 0x00000038c4e07d15 in start_thread () from /lib64/libpthread.so.0
#14 0x00000038c46f246d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ff365942880 (LWP 24382)):
[KCrash Handler]
#5  0x0000003d010874be in KStandardItem::dataValue(QByteArray const&) const () from /lib64/libdolphinprivate.so.4
#6  0x0000003d01e562fd in PlacesPanel::slotItemContextMenuRequested(int, QPointF const&) () from /lib64/libkdeinit4_dolphin.so
#7  0x00000038ce78cebf in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /lib64/libQtCore.so.4
#8  0x0000003d01072aa6 in KItemListController::itemContextMenuRequested(int, QPointF const&) () from /lib64/libdolphinprivate.so.4
#9  0x0000003d01073fca in KItemListController::mousePressEvent(QGraphicsSceneMouseEvent*, QTransform const&) () from /lib64/libdolphinprivate.so.4
#10 0x0000003d01071b3e in KItemListController::processEvent(QEvent*, QTransform const&) () from /lib64/libdolphinprivate.so.4
#11 0x0000003d0107956b in KItemListView::event(QEvent*) () from /lib64/libdolphinprivate.so.4
#12 0x00000032a37ca5cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#13 0x00000032a37cea4a in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#14 0x000000350ee46916 in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#15 0x00000038ce777a8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#16 0x00000032a3daf55b in QGraphicsScenePrivate::sendEvent(QGraphicsItem*, QEvent*) () from /lib64/libQtGui.so.4
#17 0x00000032a3db0140 in QGraphicsScenePrivate::sendMouseEvent(QGraphicsSceneMouseEvent*) () from /lib64/libQtGui.so.4
#18 0x00000032a3db5976 in QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent*) () from /lib64/libQtGui.so.4
#19 0x00000032a3db5e7f in QGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent*) () from /lib64/libQtGui.so.4
#20 0x00000032a3dc2f5a in QGraphicsScene::event(QEvent*) () from /lib64/libQtGui.so.4
#21 0x00000032a37ca5cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#22 0x00000032a37cea4a in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#23 0x000000350ee46916 in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#24 0x00000038ce777a8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#25 0x00000032a3dd3da1 in QGraphicsView::mousePressEvent(QMouseEvent*) () from /lib64/libQtGui.so.4
#26 0x00000032a3819f30 in QWidget::event(QEvent*) () from /lib64/libQtGui.so.4
#27 0x00000032a3bc49f6 in QFrame::event(QEvent*) () from /lib64/libQtGui.so.4
#28 0x00000032a3ddc51b in QGraphicsView::viewportEvent(QEvent*) () from /lib64/libQtGui.so.4
#29 0x00000038ce777bf6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#30 0x00000032a37ca59c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#31 0x00000032a37cf2ab in QApplication::notify(QObject*, QEvent*) () from /lib64/libQtGui.so.4
#32 0x000000350ee46916 in KApplication::notify(QObject*, QEvent*) () from /lib64/libkdeui.so.5
#33 0x00000038ce777a8e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /lib64/libQtCore.so.4
#34 0x00000032a37cb40b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /lib64/libQtGui.so.4
#35 0x00000032a3845b74 in QETWidget::translateMouseEvent(_XEvent const*) () from /lib64/libQtGui.so.4
#36 0x00000032a3844901 in QApplication::x11ProcessEvent(_XEvent*) () from /lib64/libQtGui.so.4
#37 0x00000032a386aa5c in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQtGui.so.4
#38 0x00000038c4247a55 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#39 0x00000038c4247d88 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#40 0x00000038c4247e44 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#41 0x00000038ce7a60d6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#42 0x00000032a386a73e in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtGui.so.4
#43 0x00000038ce7767df in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#44 0x00000038ce776a68 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#45 0x00000038ce77b858 in QCoreApplication::exec() () from /lib64/libQtCore.so.4
#46 0x0000003d01e4ebb7 in kdemain () from /lib64/libkdeinit4_dolphin.so
#47 0x00000038c4621a05 in __libc_start_main () from /lib64/libc.so.6
#48 0x00000000004008b1 in _start ()

Reported using DrKonqi
Comment 1 Frank Reininghaus 2013-02-17 09:28:10 UTC
Thanks for the bug report! I can confirm the problem. More detailed backtrace from current KDE/4.10 branch:

#6  0x00007f2183bea08a in QHash<QByteArray, QVariant>::value (this=0x20, akey=...) at /home/kde-4.10/qt/include/QtCore/../../src/corelib/tools/qhash.h:609
#7  0x00007f2183c28c1d in QHash<QByteArray, QVariant>::operator[] (this=0x20, akey=...) at /home/kde-4.10/qt/include/QtCore/../../src/corelib/tools/qhash.h:734
#8  0x00007f2183c2c7c9 in KStandardItem::dataValue (this=0x0, role=...) at /home/kde-4.10/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kstandarditem.cpp:125
#9  0x00007f2183f2a751 in PlacesPanel::slotItemContextMenuRequested (this=0x27456f0, index=8, pos=...) at /home/kde-4.10/kde/src/KDE/kde-baseapps/dolphin/src/panels/places/placespanel.cpp:272
#10 0x00007f2183f2c3f8 in PlacesPanel::qt_static_metacall (_o=0x27456f0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fff0829e030) at /home/kde-4.10/kde/build/KDE/kde-baseapps/dolphin/src/placespanel.moc:83
#11 0x00007f217ea01397 in QMetaObject::activate (sender=0x28679a0, m=0x7f2183eb9b00 <KItemListController::staticMetaObject>, local_signal_index=3, argv=0x7fff0829e030) at kernel/qobject.cpp:3543
#12 0x00007f2183c1035e in KItemListController::itemContextMenuRequested (this=0x28679a0, _t1=8, _t2=...) at /home/kde-4.10/kde/build/KDE/kde-baseapps/dolphin/src/kitemlistcontroller.moc:231
#13 0x00007f2183c0c97a in KItemListController::mousePressEvent (this=0x28679a0, event=0x7fff0829fbe0, transform=...) at /home/kde-4.10/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp:606
#14 0x00007f2183c0e34b in KItemListController::processEvent (this=0x28679a0, event=0x7fff0829fbe0, transform=...) at /home/kde-4.10/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp:975
#15 0x00007f2183c18d85 in KItemListView::event (this=0x28401c0, event=0x7fff0829fbe0) at /home/kde-4.10/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp:868
Comment 2 Frank Reininghaus 2013-02-17 10:17:41 UTC
Found a way to fix the crash. I hope that we can include this in KDE 4.10.1:

https://git.reviewboard.kde.org/r/108989/
Comment 3 Jelle Geerts 2013-02-17 12:43:26 UTC
Good work! Nice to see the bug reporting process working so quickly.
Comment 4 Frank Reininghaus 2013-02-18 23:00:46 UTC
Git commit 547d10aa16fb811df88a4804dc68410ebcd3ce73 by Frank Reininghaus.
Committed on 18/02/2013 at 23:58.
Pushed by freininghaus into branch 'KDE/4.10'.

Fix crash when clicking an action in context menu for a removed device

Devices can be added and removed while the context menu is open.
Sfter an action has clicked that needs to access a device, we therefore
have to check if its position in the model has changed, and more
importantly, if it is still there at all in order to prevent a crash.
FIXED-IN: 4.10.1
REVIEW: 108989

M  +24   -13   dolphin/src/panels/places/placespanel.cpp

http://commits.kde.org/kde-baseapps/547d10aa16fb811df88a4804dc68410ebcd3ce73
Comment 5 Frank Reininghaus 2013-02-18 23:26:16 UTC
(In reply to comment #3)
> Good work! Nice to see the bug reporting process working so quickly.

For bugs which can be reproduced easily, where the backtrace tells us immediately where the problematic code is and for which there is a straightforward fix, it really works quickly, yes. I wish all bugs were like this ;-)