Bug 504355 - Plasmashell crashes on trying to add media frame from Libreoffice Calc
Summary: Plasmashell crashes on trying to add media frame from Libreoffice Calc
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (other bugs)
Version First Reported In: 6.3.5
Platform: Arch Linux Linux
: HI crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-16 19:59 UTC by Sergey
Modified: 2025-05-20 13:44 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2025-05-16 19:59:25 UTC
SUMMARY
When you are trying to copy region of cells from Libreoffice Calc to the desktop by dragging it and choosing "Media Frame" or "Sticky Note", the plasmashell crashes.

STEPS TO REPRODUCE
1. Open any spreadsheet in Libreoffice Calc
2. Select region of cells
3. Drag them onto the desktop
4. Choose either "Media Frame" or "Sticky Note"

OBSERVED RESULT
plasmashell crashes

EXPECTED RESULT
Media Frame or Sticky Note to appear on the desktop

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-arch1-1 (64-bit)
Graphics Platform: Wayland

~> flatpak info org.libreoffice.LibreOffice

LibreOffice - The LibreOffice productivity suite

          ID: org.libreoffice.LibreOffice
         Ref: app/org.libreoffice.LibreOffice/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 25.2.3.2
     License: MPL-2.0
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 793.8 MB
     Runtime: org.freedesktop.Platform/x86_64/24.08
         Sdk: org.freedesktop.Sdk/x86_64/24.08

      Commit: 0220871080df6daa8584313cd0f4a9f7586126a3a77da825b76fae9c70d08ff2
      Parent: 7a263ad37c38188675bc202a4703038ba42a5bdcd583752b4fd6d25c4cfd1fad
     Subject: Merge pull request #323 from flathub/lo-25.2.3 (2a94cf00c88d)
        Date: 2025-04-30 14:22:40 +0000


ADDITIONAL INFORMATION
It can be reproduced both on X11 and Wayland.
Video, where bug is reproduced: https://youtu.be/bDPsIgKE9Zg
Comment 1 Lenzoid 2025-05-19 11:52:26 UTC
Thanks for reporting. I for one wasn't even aware this feature existed until now. Can confirm that in 6.4 beta.

Operating System: Arch Linux 
KDE Plasma Version: 6.3.90
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-arch1-1 (64-bit)
Graphics Platform: Wayland

yay -Qi libreoffice-fresh
Name            : libreoffice-fresh
Version         : 25.2.3-3
Description     : LibreOffice branch which contains new features and program enhancements
Architecture    : x86_64
Comment 2 Marco Martin 2025-05-19 14:51:05 UTC
can reproduce
Comment 3 Marco Martin 2025-05-19 14:52:09 UTC
#0  0x00007ffff31f98bb in QMimeDataPrivate::retrieveTypedData (this=this@entry=0x7ffff45e0f20 <QAction::staticMetaObject>, format=..., type=...)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qmimedata.cpp:106
#1  0x00007ffff31fb895 in QMimeData::data (this=<optimized out>, mimeType=...) at /home/diau/kf6/src/qtbase/src/corelib/kernel/qmimedata.cpp:554
#2  0x00007ffff7a75612 in operator() (__closure=0x17a35f0) at /home/diau/kf6/src/libplasma/src/plasmaquick/plasmoid/containmentitem.cpp:487
#3  0x00007ffff7a80ad5 in operator() (__closure=0x7fffffffbbc0) at /home/diau/qt6/include/QtCore/qobjectdefs_impl.h:116
#4  0x00007ffff7a81325 in QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, ContainmentItem::processMimeData(QMimeData*, int, int, KIO::DropJob*)::<lambda()> >::call(ContainmentItem::processMimeData(QMimeData*, int, int, KIO::DropJob*)::<lambda()>&, void**)::<lambda()> >(void **, struct {...} &&) (args=0x7fffffffbd70, fn=...)
    at /home/diau/qt6/include/QtCore/qobjectdefs_impl.h:65
#5  0x00007ffff7a80b0b in QtPrivate::FunctorCall<std::integer_sequence<long unsigned int>, QtPrivate::List<>, void, ContainmentItem::processMimeData(QMimeData*, int, int, KIO::DropJob*)::<lambda()> >::call(struct {...} &, void **) (f=..., arg=0x7fffffffbd70)
    at /home/diau/qt6/include/QtCore/qobjectdefs_impl.h:115
#6  0x00007ffff7a802ed in QtPrivate::FunctorCallable<ContainmentItem::processMimeData(QMimeData*, int, int, KIO::DropJob*)::<lambda()> >::call<QtPrivate::List<>, void>(struct {...} &, void *, void **) (f=..., arg=0x7fffffffbd70) at /home/diau/qt6/include/QtCore/qobjectdefs_impl.h:337
#7  0x00007ffff7a7f3c9 in QtPrivate::QCallableObject<ContainmentItem::processMimeData(QMimeData*, int, int, KIO::DropJob*)::<lambda()>, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (which=1, this_=0x17a35e0, r=0x152fb60, a=0x7fffffffbd70, ret=0x0)
    at /home/diau/qt6/include/QtCore/qobjectdefs_impl.h:547
#8  0x00007ffff320fa20 in QtPrivate::QSlotObjectBase::call (this=0x17a35e0, r=<optimized out>, a=0x7fffffffbd70)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461
#9  doActivate<false> (sender=0x2e53870, signal_index=7, argv=0x7fffffffbd70) at /home/diau/kf6/src/qtbase/src/corelib/kernel/qobject.cpp:4146
#10 0x00007ffff3205e97 in QMetaObject::activate
    (sender=sender@entry=0x2e53870, m=m@entry=0x7ffff45e0f20 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x7fffffffbd70) at /home/diau/kf6/src/qtbase/src/corelib/kernel/qobject.cpp:4206
#11 0x00007ffff428f936 in QMetaObject::activate<void, bool>
    (sender=0x2e53870, mo=0x7ffff45e0f20 <QAction::staticMetaObject>, local_signal_index=4, ret=0x0)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qobjectdefs.h:306
#12 QAction::triggered (this=this@entry=0x2e53870, _t1=<optimized out>)
    at /home/diau/kf6/build/qtbase/src/gui/Gui_autogen/include/moc_qaction.cpp:372
#13 0x00007ffff4292a25 in QAction::activate (this=0x2e53870, event=<optimized out>) at /home/diau/kf6/src/qtbase/src/gui/kernel/qaction.cpp:1104
#14 0x00007ffff6599414 in QMenuPrivate::activateCausedStack
    (this=0x1816540, causedStack=..., action=0x2e53870, action_e=QAction::Trigger, self=<optimized out>)
    at /home/diau/kf6/src/qtbase/src/widgets/widgets/qmenu.cpp:1411
#15 0x00007ffff65a2189 in QMenuPrivate::activateAction (this=0x1816540, action=0x2e53870, action_e=QAction::Trigger, self=<optimized out>)
    at /home/diau/kf6/src/qtbase/src/widgets/widgets/qmenu.cpp:1493
#16 0x00007ffff64070d8 in QWidget::event (this=0x6bb2a30, event=0x7fffffffc3f0) at /home/diau/kf6/src/qtbase/src/widgets/kernel/qwidget.cpp:9365
#17 0x00007ffff63a18fa in QApplicationPrivate::notify_helper (this=this@entry=0x5ed2a0, receiver=receiver@entry=0x6bb2a30, e=e@entry=0x7fffffffc3f0)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qapplication.cpp:3301
#18 0x00007ffff63abfbe in QApplication::notify (this=<optimized out>, receiver=<optimized out>, e=0x7fffffffc3f0)
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qapplication.cpp:2778
#19 0x00007ffff31a7218 in QCoreApplication::notifyInternal2 (receiver=0x6bb2a30, event=0x7fffffffc3f0)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#20 0x00007ffff31a744d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1560
#21 0x00007ffff63aa6ce in QApplicationPrivate::sendMouseEvent
    (receiver=0x6bb2a30, event=event@entry=0x7fffffffc3f0, alienWidget=<optimized out>, nativeWidget=0x6bb2a30, buttonDown=buttonDown@entry=0x7ffff69f49f0 <qt_button_down>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false)
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qapplication.cpp:2359
#22 0x00007ffff641ba41 in QWidgetWindow::handleMouseEvent (this=0x1266110, event=event@entry=0x7fffffffc680)
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qwidgetwindow.cpp:577
#23 0x00007ffff641deb8 in QWidgetWindow::event (this=0x1266110, event=0x7fffffffc680)
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qwidgetwindow.cpp:292
#24 0x00007ffff63a18fa in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1266110, e=0x7fffffffc680)
    at /home/diau/kf6/src/qtbase/src/widgets/kernel/qapplication.cpp:3301
#25 0x00007ffff31a7218 in QCoreApplication::notifyInternal2 (receiver=0x1266110, event=0x7fffffffc680)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1106
#26 0x00007ffff31a744d in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1560
#27 0x00007ffff3e026c9 in QGuiApplicationPrivate::processMouseEvent (e=0x7fff5c8a8980)
    at /home/diau/kf6/src/qtbase/src/gui/kernel/qguiapplication.cpp:2483
#28 0x00007ffff3e6c2bc in QWindowSystemInterface::sendWindowSystemEvents (flags=flags@entry=...)
    at /home/diau/kf6/src/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:1113
#29 0x00007fffeffcb22e in xcbSourceDispatch (source=<optimized out>)
    at /home/diau/kf6/src/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:57
#30 0x00007ffff2309638 in ??? () at /lib64/libglib-2.0.so.0
#31 0x00007ffff230b398 in ??? () at /lib64/libglib-2.0.so.0
#32 0x00007ffff230bbac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#33 0x00007ffff34c01d3 in QEventDispatcherGlib::processEvents (this=0x76e6e0, flags=...)
    at /home/diau/kf6/src/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399
#34 0x00007ffff31b4b4b in QEventLoop::exec (this=this@entry=0x7fffffffca60, flags=..., flags@entry=...)
    at /home/diau/kf6/src/qtbase/src/corelib/global/qflags.h:77
#35 0x00007ffff31b022e in QCoreApplication::exec () at /home/diau/kf6/src/qtbase/src/corelib/global/qflags.h:77
#36 0x0000000000437c5e in main (argc=1, argv=0x7fffffffd4e8) at /home/diau/kf6/src/plasma-workspace/shell/main.cpp:191
Comment 5 Marco Martin 2025-05-20 08:35:04 UTC
Git commit 59e22bcddec4ad2684f9b6291439725b6eedfaba by Marco Martin, on behalf of David Edmundson.
Committed on 20/05/2025 at 08:35.
Pushed by mart into branch 'master'.

Fix crash in drop job

When a mimedata is dragged onto the desktop libplasma goes through one
of two paths, one immediate, if multiple are present we show a menu and
act when one is selected.

The attached mimedata from a dropevent is only valid during the initial
handling. It is not safe to capture in a lambda.

This patch catpures data ahead of time.

This also fixes a bug that this async path could never have worked, it
needs to call into pluginFormats. Otherwise we're looking up the
mimedata 'org.kde.mediaFrame' rather than 'image/png'.

M  +9    -6    src/plasmaquick/plasmoid/containmentitem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/59e22bcddec4ad2684f9b6291439725b6eedfaba
Comment 6 Nate Graham 2025-05-20 13:44:05 UTC
Git commit 3addda549339b46026eb75ed56c48345a5108e72 by Nate Graham.
Committed on 20/05/2025 at 13:40.
Pushed by ngraham into branch 'Plasma/6.4'.

Fix crash in drop job

When a mimedata is dragged onto the desktop libplasma goes through one
of two paths, one immediate, if multiple are present we show a menu and
act when one is selected.

The attached mimedata from a dropevent is only valid during the initial
handling. It is not safe to capture in a lambda.

This patch catpures data ahead of time.

This also fixes a bug that this async path could never have worked, it
needs to call into pluginFormats. Otherwise we're looking up the
mimedata 'org.kde.mediaFrame' rather than 'image/png'.


(cherry picked from commit 59e22bcddec4ad2684f9b6291439725b6eedfaba)

987ad2d1 Fix crash in drop job

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +9    -6    src/plasmaquick/plasmoid/containmentitem.cpp

https://invent.kde.org/plasma/libplasma/-/commit/3addda549339b46026eb75ed56c48345a5108e72