Bug 378954

Summary: Dolphin crashes when dragging unused device somewhere
Product: [Applications] dolphin Reporter: Ouissal Benameur <ouissalbenameur>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: elvis.angelaccio, faure
Priority: NOR Keywords: drkonqi
Version: 16.08.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ouissal Benameur 2017-04-19 10:58:30 UTC
Application: dolphin (16.08.2)

Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.4.57-18.3-default x86_64
Distribution: "openSUSE Leap 42.2"

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

Dragging an unused device (sd card) to one of the other devices (I did so accidentally at first)

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 0x7fe07494e900 (LWP 5507))]

Thread 3 (Thread 0x7fe04c823700 (LWP 5510)):
#0  0x00007fe0741f949d in poll () from /lib64/libc.so.6
#1  0x00007fe068fe0314 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fe068fe042c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fe06e4d432b in QEventDispatcherGlib::processEvents (this=0x7fe0480008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#4  0x00007fe06e481fdb in QEventLoop::exec (this=this@entry=0x7fe04c822cd0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#5  0x00007fe06e2bcf1a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#6  0x00007fe06e2c19e9 in QThreadPrivate::start (arg=0x1fbec20) at thread/qthread_unix.cpp:341
#7  0x00007fe069b67744 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fe074201d3d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fe05729b700 (LWP 5509)):
#0  0x00007fe0741f551d in read () from /lib64/libc.so.6
#1  0x00007fe069020670 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fe068fdfe49 in g_main_context_check () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fe068fe02a8 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fe068fe042c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007fe06e4d432b in QEventDispatcherGlib::processEvents (this=0x7fe0500008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:419
#6  0x00007fe06e481fdb in QEventLoop::exec (this=this@entry=0x7fe05729aca0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#7  0x00007fe06e2bcf1a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:500
#8  0x00007fe06e8e81d5 in ?? () from /usr/lib64/libQt5DBus.so.5
#9  0x00007fe06e2c19e9 in QThreadPrivate::start (arg=0x7fe06eb50ce0) at thread/qthread_unix.cpp:341
#10 0x00007fe069b67744 in start_thread () from /lib64/libpthread.so.0
#11 0x00007fe074201d3d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fe07494e900 (LWP 5507)):
[KCrash Handler]
#6  0x0000000000000018 in ?? ()
#7  0x00007fe06e4a8c62 in QMimeDataPrivate::retrieveTypedData (this=0x2357da0, format=..., type=type@entry=QVariant::ByteArray) at kernel/qmimedata.cpp:100
#8  0x00007fe06e4a9ffd in QMimeData::data (this=<optimized out>, mimeType=...) at kernel/qmimedata.cpp:548
#9  0x00007fe072a9b4d1 in KIO::isClipboardDataCut (mimeData=<optimized out>) at /usr/src/debug/kio-5.26.0/src/widgets/paste.cpp:355
#10 0x00007fe072abd35e in KIO::PasteJobPrivate::slotStart (this=0x2356930) at /usr/src/debug/kio-5.26.0/src/widgets/pastejob.cpp:55
#11 0x00007fe072abd6c1 in KIO::PasteJob::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kio-5.26.0/build/src/widgets/moc_pastejob.cpp:95
#12 0x00007fe06e4af166 in QObject::event (this=0x24d07f0, e=<optimized out>) at kernel/qobject.cpp:1256
#13 0x00007fe06f40be3c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x24d07f0, e=0x2360640) at kernel/qapplication.cpp:3804
#14 0x00007fe06f41049a in QApplication::notify (this=0x7ffca3349520, receiver=0x24d07f0, e=0x2360640) at kernel/qapplication.cpp:3561
#15 0x00007fe06e483fc5 in QCoreApplication::notifyInternal2 (receiver=0x24d07f0, event=event@entry=0x2360640) at kernel/qcoreapplication.cpp:1015
#16 0x00007fe06e485daa in QCoreApplication::sendEvent (event=0x2360640, receiver=<optimized out>) at kernel/qcoreapplication.h:225
#17 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1acc360) at kernel/qcoreapplication.cpp:1650
#18 0x00007fe06e486358 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1508
#19 0x00007fe06e4d4c83 in postEventSourceDispatch (s=0x1b18cb0) at kernel/qeventdispatcher_glib.cpp:270
#20 0x00007fe068fe0134 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#21 0x00007fe068fe0388 in ?? () from /usr/lib64/libglib-2.0.so.0
#22 0x00007fe068fe042c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fe06e4d430c in QEventDispatcherGlib::processEvents (this=0x1b18c90, flags=...) at kernel/qeventdispatcher_glib.cpp:417
#24 0x00007fe06e481fdb in QEventLoop::exec (this=this@entry=0x7ffca33493d0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#25 0x00007fe06e489ec6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1285
#26 0x00007fe07451d96a in kdemain (argc=1, argv=<optimized out>) at /usr/src/debug/dolphin-16.08.2/src/main.cpp:150
#27 0x00007fe0741386e5 in __libc_start_main () from /lib64/libc.so.6
#28 0x0000000000400789 in _start () at ../sysdeps/x86_64/start.S:118

Possible duplicates by query: bug 378370, bug 372242.

Reported using DrKonqi
Comment 1 Elvis Angelaccio 2017-04-19 22:09:28 UTC
The problem is that DropJobPrivate::slotStart() schedules a new PasteJob for pasting "raw data", but in the meantime the QDrag object from Dolphin gets deleted and so does the mimeData instance that was passed to the paste job.

I'm not sure if this should be fixed in Dolphin (by preventing the DropJob in the first place) or in KIO, by detecting that the mimeData is invalid (e.g. check whether the mimeData has the "application/x-dolphinplacesmodel" format) before starting the PasteJob.

David, any idea?
Comment 2 Elvis Angelaccio 2017-04-21 16:40:44 UTC
Actually there is already a report for this crash.

*** This bug has been marked as a duplicate of bug 373005 ***