Bug 496048 - Unplugging/disconnecting Wacom tablet causes KDE Plasma and related applications to crash in QtWayland::zwp_tablet_pad_v2::handle_removed()
Summary: Unplugging/disconnecting Wacom tablet causes KDE Plasma and related applicati...
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 6.2.3
Platform: Arch Linux Linux
: HI crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 495107 496132 496554 496761 496953 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-11-10 12:52 UTC by June A.
Modified: 2024-12-10 17:44 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report: https://crash-reports.kde.org/organizations/kde/issues/88779/events/3c5202f5a182440ca85979016b150b45/


Attachments
The backtrace produced by Dr. Konqi (180.77 KB, text/vnd.kde.kcrash-report)
2024-11-10 12:52 UTC, June A.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description June A. 2024-11-10 12:52:15 UTC
Created attachment 175707 [details]
The backtrace produced by Dr. Konqi

SUMMARY
My Wacom Intuos CTH-490 works perfectly fine on KDE Plasma on Arch Linux. However, if the tablet is disconnected (whether via the wireless receiver, turning off the tablet while the wireless receiver is plugged in, or simply unplugging it while connected via the cable), plasmashell (and a whole bunch of other KDE Plasma-related services crash and Plasma restarts. Also, I do not have to use the stylus itself. Connecting and then disconnecting it is all it takes to crash the desktop. 

I'm not sure why this happens, and I'm very sure this isn't just my Zephyrus GA401QC (or its RTX 3050) being weird as usual, because the behavior also appears on my second laptop (Ideapad 3 14ADA05). The issue presents itself on Fedora too. This has never happened before the, I believe, 6.2.2 update for KDE Plasma. The behavior is consistent; everytime I disconnect my tablet (if it's been properly connected, of course), everything crashes. No exception, unless I plug it out as soon as it's been plugged in.

Of Note: Non-KDE applications do not crash Ever. Firefox, Spotify, Steam, etc. all continue running as if nothing happened. Also, the other KDE apps also backtraces as well. I don't know how similar they are to each other though, but I can include them if need be.

STEPS TO REPRODUCE
1. Plug in Wacom Intuos CTH-490, probably give it a second or two
2. Unplug it, whether through the USB cable, the USB receiver, or turning the tablet off via the wireless module while still connected to the receiver

OBSERVED RESULT
Everything KDE related crashes. The desktop environment, Settings, Konsole, Yakuake, Discover, and Dr. Konqi (if it was open prior to me testing the bug) all crash. Non-KDE related applications do not crash, however.

EXPECTED RESULT
Plasma working as usual.

SOFTWARE/OS VERSIONS
Linux: 6.11.6-arch1-1
KDE Plasma Version: 6.2.2 - 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-11-13 18:43:36 UTC
Thread 1 (Thread 0x747806fc9a00 (LWP 42864)):
[KCrash Handler]
#5  0x000074780e3a7387 in QtWayland::zwp_tablet_pad_v2::handle_removed (data=0x61d4c72bb280, object=0x7477f400a360) at /usr/src/debug/qt6-wayland/build/src/client/qwayland-tablet-unstable-v2.cpp:1330
#6  0x000074780e2da596 in ffi_call_unix64 () at ../src/x86/unix64.S:104
#7  0x000074780e2d700e in ffi_call_int (cif=cif@entry=0x7fffded78f60, fn=<optimized out>, rvalue=<optimized out>, avalue=<optimized out>, closure=closure@entry=0x0) at ../src/x86/ffi64.c:673
#8  0x000074780e2d9bd3 in ffi_call (cif=cif@entry=0x7fffded78f60, fn=<optimized out>, rvalue=rvalue@entry=0x0, avalue=avalue@entry=0x7fffded79030) at ../src/x86/ffi64.c:710
#9  0x000074780fe4d8b0 in wl_closure_invoke (closure=closure@entry=0x7477f4016860, target=<optimized out>, target@entry=0x7477f400a360, opcode=opcode@entry=7, data=<optimized out>, flags=1) at ../wayland-1.23.1/src/connection.c:1228
#10 0x000074780fe4e139 in dispatch_event (display=display@entry=0x61d4c4a8e5f0, queue=queue@entry=0x61d4c4a8e6e8) at ../wayland-1.23.1/src/wayland-client.c:1674
#11 0x000074780fe4e553 in dispatch_queue (display=0x61d4c4a8e5f0, queue=0x61d4c4a8e6e8) at ../wayland-1.23.1/src/wayland-client.c:1820
#12 wl_display_dispatch_queue_pending (display=0x61d4c4a8e5f0, queue=0x61d4c4a8e6e8) at ../wayland-1.23.1/src/wayland-client.c:2062
#13 0x000074780e377566 in QtWaylandClient::QWaylandDisplay::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/qt6-wayland/qtwayland/src/client/qwaylanddisplay.cpp:227
#14 0x000074780d3b247a in doActivate<false> (sender=<optimized out>, signal_index=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:4132
#15 0x000074780d5bf765 in QAbstractEventDispatcher::awake (this=0x61d4c4a8c5e0) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qabstracteventdispatcher.cpp:158
#16 QEventDispatcherGlib::processEvents (this=0x61d4c4a8c5e0, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:403
#17 0x000074780d364566 in QEventLoop::processEvents (this=0x7fffded79450, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:100
#18 QEventLoop::exec (this=0x7fffded79450, flags=...) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qeventloop.cpp:191
#19 0x000074780d359a2f in QCoreApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/corelib/global/qflags.h:74
#20 0x000074780f4fa74a in QApplication::exec () at /usr/src/debug/qt6-base/qtbase/src/widgets/kernel/qapplication.cpp:2562
#21 0x000061d4950b017f in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma-workspace/plasma-workspace-6.2.3/shell/main.cpp:192
Comment 2 Nate Graham 2024-11-13 18:43:59 UTC
*** Bug 496132 has been marked as a duplicate of this bug. ***
Comment 3 Joshua Goins 2024-11-13 18:56:57 UTC
I *think* this is https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-130314 but this smells like a 6.8.0 regression.
Comment 4 Nate Graham 2024-11-21 22:45:00 UTC
*** Bug 496554 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2024-11-27 19:40:27 UTC
*** Bug 496761 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2024-11-28 18:49:39 UTC
This is now fixed in Qt
Comment 7 David Edmundson 2024-11-28 18:50:02 UTC
*Qt 6.8.2 or 6.9.0
Comment 8 Nicolas Fella 2024-12-02 10:32:09 UTC
*** Bug 495107 has been marked as a duplicate of this bug. ***
Comment 9 Nicolas Fella 2024-12-02 10:32:47 UTC
*** Bug 496132 has been marked as a duplicate of this bug. ***
Comment 10 Reza Jahanbakhshi 2024-12-02 12:00:08 UTC
(In reply to David Edmundson from comment #7)
> *Qt 6.8.2 or 6.9.0

Looks like 6.8.2, based on https://bugreports.qt.io/browse/QTBUG-130314
Comment 11 TraceyC 2024-12-10 17:44:24 UTC
*** Bug 496953 has been marked as a duplicate of this bug. ***