Bug 489335 - Plasma commonly crashes in WaylandClipboard::gainedFocus() when copying or pasting text
Summary: Plasma commonly crashes in WaylandClipboard::gainedFocus() when copying or pa...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression, wayland-only
Depends on:
Blocks:
 
Reported: 2024-06-27 18:55 UTC by Nate Graham
Modified: 2024-06-28 15:56 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2024-06-27 18:55:15 UTC
Current git master everything, Qt 6.7.1, and I do have https://invent.kde.org/plasma/plasma-workspace/-/commit/2e76f0bcf671a1998716b97056fd44b3148bc1b6 which fixes Bug 489316.

Now, I'm getting a different semi-random crash sometimes when I copy or paste text:

Thread 1 (Thread 0x7f1a7c514b80 (LWP 199364)):
[KCrash Handler]
#5  0x00007f1a839158a4 in QtWaylandClient::QWaylandClipboard::setMimeData (this=0x3641e0f0, data=0x3d7296f0, mode=QClipboard::Clipboard) at /usr/src/debug/qt6-qtwayland-6.7.1-1.fc40.x86_64/src/client/qwaylandclipboard.cpp:73
#6  0x00007f1a8433a81a in WaylandClipboard::gainedFocus (this=0x38f485a0) at /home/nate/kde/src/kguiaddons/src/systemclipboard/waylandclipboard.cpp:626
#7  0x00007f1a81ffa752 in QtPrivate::QSlotObjectBase::call (this=0x38f5de40, r=<optimized out>, a=0x7fff19838b88) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobjectdefs_impl.h:469
#8  doActivate<false> (sender=0x38f47fe0, signal_index=5, argv=0x7fff19838b88) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobject.cpp:4086
#9  0x00007f1a8164a056 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#10 0x00007f1a816466a0 in ffi_call_int (cif=cif@entry=0x7fff19838da0, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#11 0x00007f1a816494ee in ffi_call (cif=cif@entry=0x7fff19838da0, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fff19838e70) at ../src/x86/ffi64.c:710
#12 0x00007f1a85783f2e in wl_closure_invoke (closure=closure@entry=0x7f1a60007d60, target=<optimized out>, target@entry=0x38f59500, opcode=opcode@entry=1, data=<optimized out>, flags=1) at ../src/connection.c:1025
#13 0x00007f1a857847a3 in dispatch_event (display=display@entry=0x3630c9b0, queue=0x3630caa0) at ../src/wayland-client.c:1631
#14 0x00007f1a85784a4c in dispatch_queue (queue=0x3630caa0, display=0x3630c9b0) at ../src/wayland-client.c:1777
#15 wl_display_dispatch_queue_pending (display=0x3630c9b0, queue=0x3630caa0) at ../src/wayland-client.c:2019
#16 0x00007f1a838cbc22 in QtWaylandClient::QWaylandDisplay::flushRequests (this=<optimized out>) at /usr/src/debug/qt6-qtwayland-6.7.1-1.fc40.x86_64/src/client/qwaylanddisplay.cpp:227
#17 0x00007f1a81ffaac0 in doActivate<false> (sender=0x36309dd0, signal_index=4, argv=0x7fff198390c8) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobject.cpp:4098
#18 0x00007f1a81ff0b47 in QMetaObject::activate (sender=sender@entry=0x36309dd0, m=m@entry=0x7f1a8247fa60 <QAbstractEventDispatcher::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qobject.cpp:4146
#19 0x00007f1a81f921c7 in QAbstractEventDispatcher::awake (this=this@entry=0x36309dd0) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/redhat-linux-build/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:158
#20 0x00007f1a8227cb8b in QEventDispatcherGlib::processEvents (this=0x36309dd0, flags=...) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/kernel/qeventdispatcher_glib.cpp:401
#21 0x00007f1a81fa2713 in QEventLoop::exec (this=this@entry=0x7fff19839210, flags=..., flags@entry=...) at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/global/qflags.h:34
#22 0x00007f1a81f9e69c in QCoreApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/corelib/global/qflags.h:74
#23 0x00007f1a829d53dd in QGuiApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/gui/kernel/qguiapplication.cpp:1926
#24 0x00007f1a8478b0d9 in QApplication::exec () at /usr/src/debug/qt6-qtbase-6.7.1-2.fc40.x86_64/src/widgets/kernel/qapplication.cpp:2555
#25 0x0000000000427a86 in main (argc=<optimized out>, argv=<optimized out>) at /home/nate/kde/src/plasma-workspace/shell/main.cpp:188
Comment 1 Fushan Wen 2024-06-28 00:32:00 UTC
Git commit d4bd869b0d3bd592e2184ae3b4725f803c602a70 by Fushan Wen.
Committed on 28/06/2024 at 00:30.
Pushed by fusionfuture into branch 'master'.

klipper: ensure clip mimeData is set in the same thread

M  +1    -1    klipper/systemclipboard.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/d4bd869b0d3bd592e2184ae3b4725f803c602a70
Comment 2 Fushan Wen 2024-06-28 00:53:28 UTC
Are you using SyncClipboards?
Comment 3 Nate Graham 2024-06-28 15:56:20 UTC
No, Klipper is using default settings.

However I think I was wrong and at the time I opened this, I did not actually have https://invent.kde.org/plasma/plasma-workspace/-/commit/2e76f0bcf671a1998716b97056fd44b3148bc1b6 applied. It's stopped happening since I verified that I've got that commit.

Will re-open if it starts happening again.