Bug 380806 - crash in folder view mode
Summary: crash in folder view mode
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.10.0
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-04 10:36 UTC by Gabriel C
Modified: 2017-06-04 14:44 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.10.1


Attachments
bt (6.67 KB, text/plain)
2017-06-04 10:36 UTC, Gabriel C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel C 2017-06-04 10:36:20 UTC
Created attachment 105905 [details]
bt

1) add 2 new folders 
2) drag one of them into the other popup

there is a small video :

http://ftp.frugalware.org/pub/other/people/crazy/crash.mkv

BT:

https://paste.opensuse.org/view/raw/53811651


Qt: 5.9.0
Gcc: 6.3.1 20170302
Comment 1 Kai Uwe Broulik 2017-06-04 10:37:54 UTC
Pasting inline:

New Thread 0x7fff19d30700 (LWP 12176)]
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:196:13: QML Loader: grabToImage: item is not attached to a window
file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml:196:13: QML Loader: grabToImage: item is not attached to a window

Thread 1 "plasmashell" received signal SIGSEGV, Segmentation fault.
0x00007ffff4eefb24 in QQmlData::wasDeleted (object=0x39e1b70) at ../../include/QtQml/5.9.0/QtQml/private/../../../../../src/qml/qml/qqmldata_p.h:271
271     ../../include/QtQml/5.9.0/QtQml/private/../../../../../src/qml/qml/qqmldata_p.h: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0  0x00007ffff4eefb24 in QQmlData::wasDeleted(QObject*) (object=0x39e1b70) at ../../include/QtQml/5.9.0/QtQml/private/../../../../../src/qml/qml/qqmldata_p.h:271
#1  0x00007ffff4eefb24 in QV4::QObjectWrapper::wrap(QV4::ExecutionEngine*, QObject*) (object=0x39e1b70, engine=0x80d760)
    at ../../include/QtQml/5.9.0/QtQml/private/../../../../../src/qml/jsruntime/qv4qobjectwrapper_p.h:209
#2  0x00007ffff4eefb24 in QQmlBoundSignalExpression::evaluate(void**) (this=<optimized out>, a=a@entry=0x7fffffffd440) at qml/qqmlboundsignal.cpp:217
#3  0x00007ffff4ef0088 in QQmlBoundSignal_callback(QQmlNotifierEndpoint*, void**) (e=0xeb5fe0, a=0x7fffffffd440) at qml/qqmlboundsignal.cpp:355
#4  0x00007ffff4f31db2 in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (endpoint=<optimized out>, a=a@entry=0x7fffffffd440) at qml/qqmlnotifier.cpp:106
#5  0x00007ffff4ecbf27 in QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) (object=0xe156b0, index=49, a=0x7fffffffd440) at qml/qqmlengine.cpp:839
#6  0x00007ffff2177ec0 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0xe156b0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=22, argv=argv@entry=0x7fffffffd440) at kernel/qobject.cpp:3644
#7  0x00007ffff2178835 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0xe156b0, m=<optimized out>, local_signal_index=22, argv=0x7fffffffd440)
    at kernel/qobject.cpp:3628
#8  0x00007fff3a8c43ae in FolderModel::popupMenuAboutToShow(KIO::DropJob*, QMimeData*, int, int) () at /usr/share/qt5/qml/org/kde/private/desktopcontainment/folder/libfolderplugin.so
#9  0x00007ffff21782d3 in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=<optimized out>, r=0xe156b0, this=<optimized out>)
    at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
#10 0x00007ffff21782d3 in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x768e70, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffffffd590) at kernel/qobject.cpp:3749
#11 0x00007ffff2178835 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=0x768e70, m=<optimized out>, local_signal_index=2, argv=0x7fffffffd590)
    at kernel/qobject.cpp:3628
#12 0x00007fffefc9f809 in KIO::DropJob::popupMenuAboutToShow(KFileItemListProperties const&) (this=0x768e70, _t1=...)
    at /var/tmp/fst/src/kio-5.34.0/frugalware_cmake_build/src/widgets/KF5KIOWidgets_autogen/include/moc_dropjob.cpp:195
#13 0x00007fffefc9d688 in KIO::DropJobPrivate::fillPopupMenu(KIO::DropMenu*) (this=0x39e1c60, popup=0x39c1e40) at /var/tmp/fst/src/kio-5.34.0/src/widgets/dropjob.cpp:306
#14 0x00007fffefc9e852 in KIO::DropJobPrivate::handleCopyToDirectory() (this=0x39e1c60) at /var/tmp/fst/src/kio-5.34.0/src/widgets/dropjob.cpp:435
#15 0x00007fffefc9cde5 in KIO::DropJobPrivate::slotStart() (this=0x39e1c60) at /var/tmp/fst/src/kio-5.34.0/src/widgets/dropjob.cpp:215
#16 0x00007fffefc9f464 in KIO::DropJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x768e70, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x39e1d10)
    at /var/tmp/fst/src/kio-5.34.0/frugalware_cmake_build/src/widgets/KF5KIOWidgets_autogen/include/moc_dropjob.cpp:100
#17 0x00007ffff217463a in QMetaCallEvent::placeMetaCall(QObject*) (this=0x39e1e20, object=0x768e70) at kernel/qobject.cpp:503
#18 0x00007ffff2178c8f in QObject::event(QEvent*) (this=0x768e70, e=<optimized out>) at kernel/qobject.cpp:1246
#19 0x00007ffff3100893 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x6b9990, receiver=receiver@entry=0x768e70, e=e@entry=0x39e1e20)
    at kernel/qapplication.cpp:3717
#20 0x00007ffff310863e in QApplication::notify(QObject*, QEvent*) (this=0x7fffffffe310, receiver=0x768e70, e=0x39e1e20) at kernel/qapplication.cpp:3089
#21 0x00007ffff2148f7e in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=receiver@entry=0x768e70, event=event@entry=0x39e1e20) at kernel/qcoreapplication.cpp:1018
#22 0x00007ffff214df3f in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x39e1e20, receiver=0x768e70) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
#23 0x00007ffff214df3f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x6afb90)
    at kernel/qcoreapplication.cpp:1678
#24 0x00007ffff214e69c in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1532
#25 0x00007ffff21a1c98 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x6f3c20) at kernel/qeventdispatcher_glib.cpp:276
#26 0x00007fffeab7e107 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#27 0x00007fffeab7e338 in  () at /usr/lib/libglib-2.0.so.0
#28 0x00007fffeab7e3dc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff21a1d08 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x701440, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#30 0x00007fffdcdf64c8 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=<optimized out>, flags=...) at qeventdispatcher_glib.cpp:122
#31 0x00007ffff2147011 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffe1b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:134
#32 0x00007ffff214743d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffe1b0, flags=flags@entry=...) at kernel/qeventloop.cpp:212
#33 0x00007ffff2150b54 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1291
#34 0x00007ffff2968f04 in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1666
#35 0x00007ffff3100725 in QApplication::exec() () at kernel/qapplication.cpp:2905
#36 0x000000000041ebca in  ()
#37 0x00007ffff17d24f1 in __libc_start_main () at /lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
#38 0x000000000041edfa in _start ()
Comment 2 Fabian Vogt 2017-06-04 11:14:48 UTC
Reverting https://phabricator.kde.org/D6017 in kdeclarative helps, so this needs to be sorted before frameworks 5.35 release.
Comment 3 Kai Uwe Broulik 2017-06-04 11:20:26 UTC
The patch to KDeclarative is correct imho but FolderModel::drop stores the mimeData pointer and then uses it asynchronously once popupMenuAboutToShow fired at a point where the original DropArea event is already destroyed. This needs to be fixed in FolderView.
Comment 4 Kai Uwe Broulik 2017-06-04 14:44:36 UTC
Git commit 77f1e675178ac995f7eb74c0410b5028ca1d74de by Kai Uwe Broulik.
Committed on 04/06/2017 at 14:43.
Pushed by broulik into branch 'Plasma/5.10'.

[Folder View] Use a copy of QMimeData in signal handler

By the time we leave the method, the QMimeData is deleted by the DragArea's drop event being destroyed leading to a crash.

CHANGELOG: Fixed crash when dropping files on desktop with KDeclarative from KDE Frameworks 5.35
FIXED-IN: 5.10.1

Differential Revision: https://phabricator.kde.org/D6088

M  +10   -2    containments/desktop/plugins/folder/foldermodel.cpp

https://commits.kde.org/plasma-desktop/77f1e675178ac995f7eb74c0410b5028ca1d74de