Bug 480312 - Plasma crashes in QMimeDataPrivate::retrieveTypedData() when trying to create a Sticky Note with a url dragged from Vivaldi browser
Summary: Plasma crashes in QMimeDataPrivate::retrieveTypedData() when trying to create...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: master
Platform: Neon Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-01-25 11:09 UTC by Patrick Silva
Modified: 2024-10-01 18:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
long backtrace (82.85 KB, text/vnd.kde.kcrash-report)
2024-01-25 11:09 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2024-01-25 11:09:12 UTC
Created attachment 165206 [details]
long backtrace

STEPS TO REPRODUCE
1. run Vivaldi browser natively on Wayland - I did not test with another browser
2. load any website
3. drag the loaded url and drop it on desktop - a context menu opens
4. choose the option from the context menu used to create a Sticky Note

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-01-25 23:20:39 UTC
That is a long backtrace. Here's the crashing thread:

Thread 1 (Thread 0x732b76267ac0 (LWP 1199)):
[KCrash Handler]
#6  0x0000732b7adc94ca in QMimeDataPrivate::q_func() const (this=<optimized out>) at ./src/corelib/kernel/qmimedata.cpp:31
#7  QMimeDataPrivate::retrieveTypedData(QString const&, QMetaType) const (this=this@entry=0x0, format=..., type=...) at ./src/corelib/kernel/qmimedata.cpp:81
#8  0x0000732b7adca7ff in QMimeData::data(QString const&) const (this=<optimized out>, mimeType=...) at ./src/corelib/kernel/qmimedata.cpp:534
#9  0x0000732b7d7cfb58 in  () at /lib/x86_64-linux-gnu/libPlasmaQuick.so.6
#10 0x0000732b7ae287ae in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7ffc9e57a280, r=0x63491f652b30, this=<optimized out>, this=<optimized out>, r=<optimized out>, a=<optimized out>) at ./src/corelib/kernel/qobjectdefs_impl.h:433
#11 doActivate<false>(QObject*, int, void**) (sender=0x63491e5a21d0, signal_index=7, argv=0x7ffc9e57a280) at ./src/corelib/kernel/qobject.cpp:4021
#12 0x0000732b7b63b956 in QAction::triggered(bool) (this=this@entry=0x63491e5a21d0, _t1=<optimized out>) at ./obj-x86_64-linux-gnu/src/gui/Gui_autogen/include/moc_qaction.cpp:642
#13 0x0000732b7b63f6b4 in QAction::activate(QAction::ActionEvent) (this=0x63491e5a21d0, event=<optimized out>) at ./src/gui/kernel/qaction.cpp:1102
#14 0x0000732b7ccea96e in QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (this=0x6349273cfc20, causedStack=..., action=0x63491e5a21d0, action_e=QAction::Trigger, self=<optimized out>) at ./src/widgets/widgets/qmenu.cpp:1413
#15 0x0000732b7ccf2bd9 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (this=0x6349273cfc20, action=0x63491e5a21d0, action_e=QAction::Trigger, self=<optimized out>) at ./src/widgets/widgets/qmenu.cpp:1495
#16 0x0000732b7ce2c21f in QWidget::event(QEvent*) (this=0x6349245a5150, event=0x7ffc9e57a8f0) at ./src/widgets/kernel/qwidget.cpp:8983
#17 0x0000732b7cdf1b1b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x63491e1aa2f0, receiver=receiver@entry=0x6349245a5150, e=e@entry=0x7ffc9e57a8f0) at ./src/widgets/kernel/qapplication.cpp:3296
#18 0x0000732b7cdf5d6e in QApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x6349245a5150, e=0x7ffc9e57a8f0) at ./src/widgets/kernel/qapplication.cpp:2782
#19 0x0000732b7ae5fe58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=receiver@entry=0x6349245a5150, event=event@entry=0x7ffc9e57a8f0) at ./src/corelib/kernel/qcoreapplication.cpp:1121
#20 0x0000732b7ae6037d in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=receiver@entry=0x6349245a5150, event=event@entry=0x7ffc9e57a8f0) at ./src/corelib/kernel/qcoreapplication.cpp:1553
#21 0x0000732b7cdf1208 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (receiver=0x6349245a5150, event=0x7ffc9e57a8f0, alienWidget=0x0, nativeWidget=0x6349245a5150, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at ./src/widgets/kernel/qapplication.cpp:2366
#22 0x0000732b7ce3f9e8 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=0x63491e521ba0, event=0x7ffc9e57ac90) at ./src/widgets/kernel/qwidgetwindow.cpp:523
#23 0x0000732b7ce38dd5 in QWidgetWindow::event(QEvent*) (this=0x63491e521ba0, event=0x7ffc9e57ac90) at ./src/widgets/kernel/qwidgetwindow.cpp:241
#24 0x0000732b7cdf1b1b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x63491e521ba0, e=0x7ffc9e57ac90) at ./src/widgets/kernel/qapplication.cpp:3296
#25 0x0000732b7ae5fe58 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=receiver@entry=0x63491e521ba0, event=event@entry=0x7ffc9e57ac90) at ./src/corelib/kernel/qcoreapplication.cpp:1121
#26 0x0000732b7ae6037d in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=receiver@entry=0x63491e521ba0, event=event@entry=0x7ffc9e57ac90) at ./src/corelib/kernel/qcoreapplication.cpp:1553
#27 0x0000732b7b2ef01b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x732b6800e8b0) at ./src/gui/kernel/qguiapplication.cpp:2323
#28 0x0000732b7b35553c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=...) at ./src/gui/kernel/qwindowsysteminterface.cpp:1109
#29 0x0000732b7b70a994 in userEventSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at ./src/gui/platform/unix/qeventdispatcher_glib.cpp:38
#30 0x0000732b79652d3b in g_main_dispatch (context=0x732b70005040) at ../../../glib/gmain.c:3419
#31 g_main_context_dispatch (context=0x732b70005040) at ../../../glib/gmain.c:4137
#32 0x0000732b796a8258 in g_main_context_iterate.constprop.0 (context=context@entry=0x732b70005040, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4213
#33 0x0000732b796503e3 in g_main_context_iteration (context=0x732b70005040, may_block=1) at ../../../glib/gmain.c:4278
#34 0x0000732b7ad082c0 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x63491e1ddc30, flags=...) at ./src/corelib/kernel/qeventdispatcher_glib.cpp:393
#35 0x0000732b7ae6a01b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7ffc9e57b0d0, flags=...) at ./src/corelib/global/qflags.h:34
#36 0x0000732b7ae63d0c in QCoreApplication::exec() () at ./src/corelib/global/qflags.h:74
#37 0x0000732b7b2ea040 in QGuiApplication::exec() () at ./src/gui/kernel/qguiapplication.cpp:1925
#38 0x0000732b7cdef089 in QApplication::exec() () at ./src/widgets/kernel/qapplication.cpp:2574
#39 0x000063491c51c9a4 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./shell/main.cpp:214
Comment 2 Akseli Lahtinen 2024-02-07 08:37:40 UTC
I can't reproduce this crash on my Plasma 6 setup

Operating System: Fedora Linux 39
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.0
Kernel Version: 6.7.3-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600
Comment 3 Bug Janitor Service 2024-02-08 15:59:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1053
Comment 4 Marco Martin 2024-02-08 16:00:09 UTC
oddly enough i can reproduce a crash while dropping the addressbar url, *but* not with this backtrace, but a slightly different one with an assert, which the above merge request fixes
Comment 5 Marco Martin 2024-02-09 13:15:04 UTC
Git commit 7ec09e5fb794d3280a03774c8499ddc92b3b3322 by Marco Martin.
Committed on 09/02/2024 at 13:14.
Pushed by mart into branch 'master'.

Guard against invalid URL mimedata with no urls

It's possible that the dropped mimedata claims to have urls, but its
actual url list is empty. This happens for instance when droppping
the url of chromium from its addressbar.

Guard against it to prevent an assert

M  +4    -0    src/plasmaquick/plasmoid/containmentitem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/7ec09e5fb794d3280a03774c8499ddc92b3b3322
Comment 6 Marco Martin 2024-02-09 13:15:53 UTC
Git commit c27834d9bf58371708ccb1daf396427b15551300 by Marco Martin.
Committed on 09/02/2024 at 13:15.
Pushed by mart into branch 'Plasma/6.0'.

Guard against invalid URL mimedata with no urls

It's possible that the dropped mimedata claims to have urls, but its
actual url list is empty. This happens for instance when droppping
the url of chromium from its addressbar.

Guard against it to prevent an assert

M  +4    -0    src/plasmaquick/plasmoid/containmentitem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/c27834d9bf58371708ccb1daf396427b15551300