Bug 329119 - Dolphin crashes when dragging a child of an expanded folder in Details View (regression in master)
Summary: Dolphin crashes when dragging a child of an expanded folder in Details View (...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Unclassified
Component: view-engine: details mode (show other bugs)
Version: 16.12.2
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-22 12:07 UTC by Frank Reininghaus
Modified: 2013-12-22 12:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reininghaus 2013-12-22 12:07:27 UTC
This is a regression in the master branch caused by https://git.reviewboard.kde.org/r/113515/.

A patch is available at https://git.reviewboard.kde.org/r/114562/

Reproducible: Always

Steps to Reproduce:
1. Expand a folder in Details View.
2. Click a child of the expanded folder and drag it.

Actual Results:  
Dolphin crashes.
Comment 1 Frank Reininghaus 2013-12-22 12:11:35 UTC
Application: Dolphin (dolphin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f8146a2e880 (LWP 13476))]

Thread 4 (Thread 0x7f8130311700 (LWP 13478)):
#0  0x00007f813ffb5b3d in poll () from /lib64/libc.so.6
#1  0x00007f813be3f604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f813be3f70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8141181de6 in QEventDispatcherGlib::processEvents (this=0x7f81280008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f814114306c in QEventLoop::processEvents (this=0x7f8130310cd0, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f81411431f6 in QEventLoop::exec (this=0x7f8130310cd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f81410115cb in QThread::exec (this=0xea96a0) at thread/qthread.cpp:501
#7  0x00007f814111e36b in QInotifyFileSystemWatcherEngine::run (this=0xea96a0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f8141013ef8 in QThreadPrivate::start (arg=0xea96a0) at thread/qthread_unix.cpp:307
#9  0x00007f8140d530db in start_thread () from /lib64/libpthread.so.0
#10 0x00007f813ffbe90d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f812f9b0700 (LWP 13479)):
#0  0x00007f813ffb5b3d in poll () from /lib64/libc.so.6
#1  0x00007f813be3f604 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f813be3f70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f8141181dc3 in QEventDispatcherGlib::processEvents (this=0x7f81200008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f814114306c in QEventLoop::processEvents (this=0x7f812f9afd00, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f81411431f6 in QEventLoop::exec (this=0x7f812f9afd00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f81410115cb in QThread::exec (this=0xfb57b0) at thread/qthread.cpp:501
#7  0x00007f814101176a in QThread::run (this=0xfb57b0) at thread/qthread.cpp:568
#8  0x00007f8141013ef8 in QThreadPrivate::start (arg=0xfb57b0) at thread/qthread_unix.cpp:307
#9  0x00007f8140d530db in start_thread () from /lib64/libpthread.so.0
#10 0x00007f813ffbe90d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f812edbf700 (LWP 13486)):
#0  0x00007f813ffb7913 in select () from /lib64/libc.so.6
#1  0x00007f81411188a4 in QProcessManager::run (this=0x7f81414fd9c0 <processManager()::processManager>) at io/qprocess_unix.cpp:245
#2  0x00007f8141013ef8 in QThreadPrivate::start (arg=0x7f81414fd9c0 <processManager()::processManager>) at thread/qthread_unix.cpp:307
#3  0x00007f8140d530db in start_thread () from /lib64/libpthread.so.0
#4  0x00007f813ffbe90d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f8146a2e880 (LWP 13476)):
[KCrash Handler]
#6  0x00007f81462a6372 in KFileItemModel::createMimeData (this=0x1200710, indexes=...) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kfileitemmodel.cpp:256
#7  0x00007f81462d07f8 in KItemListController::startDragging (this=0xf53100) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp:1156
#8  0x00007f81462ce594 in KItemListController::mouseMoveEvent (this=0xf53100, event=0x7fffa3914c90, transform=...) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp:688
#9  0x00007f81462cfa4b in KItemListController::processEvent (this=0xf53100, event=0x7fffa3914c90, transform=...) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistcontroller.cpp:1008
#10 0x00007f81462d9db9 in KItemListView::event (this=0x1115bb0, event=0x7fffa3914c90) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/kitemviews/kitemlistview.cpp:898
#11 0x00007f81424a2518 in QApplicationPrivate::notify_helper (this=0xc61d90, receiver=0x1115bb0, e=0x7fffa3914c90) at kernel/qapplication.cpp:4551
#12 0x00007f814249fb54 in QApplication::notify (this=0x7fffa3916b70, receiver=0x1115bb0, e=0x7fffa3914c90) at kernel/qapplication.cpp:3933
#13 0x00007f81434e66aa in KApplication::notify (this=0x7fffa3916b70, receiver=0x1115bb0, event=0x7fffa3914c90) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#14 0x00007f8141145b32 in QCoreApplication::notifyInternal (this=0x7fffa3916b70, receiver=0x1115bb0, event=0x7fffa3914c90) at kernel/qcoreapplication.cpp:915
#15 0x00007f81424a4cdd in QCoreApplication::sendSpontaneousEvent (receiver=0x1115bb0, event=0x7fffa3914c90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#16 0x00007f81424a2867 in qt_sendSpontaneousEvent (receiver=0x1115bb0, event=0x7fffa3914c90) at kernel/qapplication.cpp:5549
#17 0x00007f8142c41ce8 in QGraphicsScenePrivate::sendEvent (this=0x11b39f0, item=0x1115bc0, event=0x7fffa3914c90) at graphicsview/qgraphicsscene.cpp:1217
#18 0x00007f8142c4275e in QGraphicsScenePrivate::sendMouseEvent (this=0x11b39f0, mouseEvent=0x7fffa3914c90) at graphicsview/qgraphicsscene.cpp:1295
#19 0x00007f8142c4b132 in QGraphicsScene::mouseMoveEvent (this=0x11550f0, mouseEvent=0x7fffa3914c90) at graphicsview/qgraphicsscene.cpp:4102
#20 0x00007f8142c48f44 in QGraphicsScene::event (this=0x11550f0, event=0x7fffa3914c90) at graphicsview/qgraphicsscene.cpp:3451
#21 0x00007f81424a2518 in QApplicationPrivate::notify_helper (this=0xc61d90, receiver=0x11550f0, e=0x7fffa3914c90) at kernel/qapplication.cpp:4551
#22 0x00007f814249fb54 in QApplication::notify (this=0x7fffa3916b70, receiver=0x11550f0, e=0x7fffa3914c90) at kernel/qapplication.cpp:3933
#23 0x00007f81434e66aa in KApplication::notify (this=0x7fffa3916b70, receiver=0x11550f0, event=0x7fffa3914c90) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#24 0x00007f8141145b32 in QCoreApplication::notifyInternal (this=0x7fffa3916b70, receiver=0x11550f0, event=0x7fffa3914c90) at kernel/qcoreapplication.cpp:915
#25 0x00007f81424a4cdd in QCoreApplication::sendSpontaneousEvent (receiver=0x11550f0, event=0x7fffa3914c90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#26 0x00007f81424a2867 in qt_sendSpontaneousEvent (receiver=0x11550f0, event=0x7fffa3914c90) at kernel/qapplication.cpp:5549
#27 0x00007f8142c717de in QGraphicsViewPrivate::mouseMoveEventHandler (this=0x104dd10, event=0x7fffa3915d80) at graphicsview/qgraphicsview.cpp:646
#28 0x00007f8142c7b8b3 in QGraphicsView::mouseMoveEvent (this=0x10f7910, event=0x7fffa3915d80) at graphicsview/qgraphicsview.cpp:3276
#29 0x00007f8142506df8 in QWidget::event (this=0x10f7910, event=0x7fffa3915d80) at kernel/qwidget.cpp:8356
#30 0x00007f81429cd9c3 in QFrame::event (this=0x10f7910, e=0x7fffa3915d80) at widgets/qframe.cpp:557
#31 0x00007f8142a784bb in QAbstractScrollArea::viewportEvent (this=0x10f7910, e=0x7fffa3915d80) at widgets/qabstractscrollarea.cpp:1043
#32 0x00007f8142c79e0a in QGraphicsView::viewportEvent (this=0x10f7910, event=0x7fffa3915d80) at graphicsview/qgraphicsview.cpp:2866
#33 0x00007f8142a791b1 in QAbstractScrollAreaPrivate::viewportEvent (this=0x104dd10, event=0x7fffa3915d80) at widgets/qabstractscrollarea_p.h:100
#34 0x00007f8142a792aa in QAbstractScrollAreaFilter::eventFilter (this=0x1198150, o=0x10c37a0, e=0x7fffa3915d80) at widgets/qabstractscrollarea_p.h:116
#35 0x00007f8141145dd1 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0xc61d90, receiver=0x10c37a0, event=0x7fffa3915d80) at kernel/qcoreapplication.cpp:1025
#36 0x00007f81424a24ef in QApplicationPrivate::notify_helper (this=0xc61d90, receiver=0x10c37a0, e=0x7fffa3915d80) at kernel/qapplication.cpp:4547
#37 0x00007f81424a04b8 in QApplication::notify (this=0x7fffa3916b70, receiver=0x10c37a0, e=0x7fffa3915d80) at kernel/qapplication.cpp:4094
#38 0x00007f81434e66aa in KApplication::notify (this=0x7fffa3916b70, receiver=0x10c37a0, event=0x7fffa3915d80) at /home/kde-devel/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#39 0x00007f8141145b32 in QCoreApplication::notifyInternal (this=0x7fffa3916b70, receiver=0x10c37a0, event=0x7fffa3915d80) at kernel/qcoreapplication.cpp:915
#40 0x00007f81424a4cdd in QCoreApplication::sendSpontaneousEvent (receiver=0x10c37a0, event=0x7fffa3915d80) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#41 0x00007f814249ead2 in QApplicationPrivate::sendMouseEvent (receiver=0x10c37a0, event=0x7fffa3915d80, alienWidget=0x10c37a0, nativeWidget=0xe22590, buttonDown=0x7f814324d558 <qt_button_down>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3160
#42 0x00007f814254251d in QETWidget::translateMouseEvent (this=0xe22590, event=0x7fffa3916760) at kernel/qapplication_x11.cpp:4502
#43 0x00007f814253ef12 in QApplication::x11ProcessEvent (this=0x7fffa3916b70, event=0x7fffa3916760) at kernel/qapplication_x11.cpp:3503
#44 0x00007f8142579740 in x11EventSourceDispatch (s=0xc6e570, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#45 0x00007f813be3f316 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#46 0x00007f813be3f668 in ?? () from /usr/lib64/libglib-2.0.so.0
#47 0x00007f813be3f70c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#48 0x00007f8141181dc3 in QEventDispatcherGlib::processEvents (this=0xc3a5b0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#49 0x00007f8142579ae0 in QGuiEventDispatcherGlib::processEvents (this=0xc3a5b0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#50 0x00007f814114306c in QEventLoop::processEvents (this=0x7fffa3916ae0, flags=...) at kernel/qeventloop.cpp:149
#51 0x00007f81411431f6 in QEventLoop::exec (this=0x7fffa3916ae0, flags=...) at kernel/qeventloop.cpp:204
#52 0x00007f81411461b2 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#53 0x00007f814249f73e in QApplication::exec () at kernel/qapplication.cpp:3812
#54 0x00007f81465f2435 in kdemain (argc=2, argv=0x7fffa3917118) at /home/kde-devel/kde/src/KDE/kde-baseapps/dolphin/src/main.cpp:93
#55 0x0000000000400a72 in main (argc=2, argv=0x7fffa3917118) at /home/kde-devel/kde/build/KDE/kde-baseapps/dolphin/src/dolphin_dummy.cpp:3
Comment 2 Frank Reininghaus 2013-12-22 12:13:23 UTC
Git commit 640f5dca628a837c505fc7050d9cb5149fddcb97 by Frank Reininghaus.
Committed on 22/12/2013 at 12:08.
Pushed by freininghaus into branch 'KDE/4.12'.

Add unit test for KFileItemModel::createMimeData().

The test verifies that creating the mime data for a child of an expanced
folder does not cause a crash. The regression happenened in the master
branch, but it doesn't hurt to have the test also in KDE/4.12.

M  +1    -0    dolphin/src/tests/CMakeLists.txt
M  +28   -0    dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/640f5dca628a837c505fc7050d9cb5149fddcb97
Comment 3 Frank Reininghaus 2013-12-22 12:19:51 UTC
Git commit 5e13b762f432cbe043a6d6d6e4ebe33ff55a65fb by Frank Reininghaus.
Committed on 22/12/2013 at 12:17.
Pushed by freininghaus into branch 'master'.

Fix crash when dragging children of expanded folders in Details View

The problem was that the loop in KFileItemModel::createMimeData() which
is supposed to find out if any parent of an item has been added to the
QMimeData already (because it is not necessary to add the item in that
case) did not loop through the parents of the item, but incorrectly
replaced the local variable 'itemData' by its parent.
REVIEW: 114562

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

http://commits.kde.org/kde-baseapps/5e13b762f432cbe043a6d6d6e4ebe33ff55a65fb