Created attachment 141635 [details] Kwin Backtrace SUMMARY: When I connect my wacom drawing tablet to my computer using bluetooth and then disconnect the tablet by powering it off, kwin crashes, bringing down my whole wayland session and lose all my windows. STEPS TO REPRODUCE: 1. Connect bluetooth drawing tablet 2. Use it for a bit 3. Disconnect the bluetooth drawing tablet 4. Kwin crashes and brings down the whole wayland session OBSERVED RESULT: Kwin crashes after I disconnect the bluetooth drawing tablet. EXPECTED RESULT: Kwin does not crash. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Operating System: Arch Linux KDE Plasma Version: 5.22.90 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: 5.14.5-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 8 × AMD Ryzen 5 3450U with Radeon Vega Mobile Gfx Memory: 5.7 GiB of RAM Graphics Processor: AMD Radeon™ Vega 8 Graphics ADDITIONAL INFORMATION: I recompiled kwin, kwayland, kwayland-integration, kwayland-server, qt5-base, qt5-wayland and wayland with debugging support, because Arch Linux doesn't have debugging packages.
#0 0x00007fb613383e08 in KWaylandServer::TabletV2Interface::isSurfaceSupported(KWaylandServer::SurfaceInterface*) const (this=this@entry=0x0, surface=surface@entry=0x5569d36ebc30) at /usr/src/debug/kwayland-server-5.22.90/src/server/tablet_v2_interface.cpp:63 #1 0x00007fb614174e2f in KWin::TabletInputFilter::tabletToolEvent(KWin::TabletEvent*) (this=0x5569d32e0c30, event=0x7ffcdafb55a0) at /usr/src/debug/kwin-5.22.90/src/input.cpp:1787 interesting... Aleix, do you know how TabletV2Interface can end up being nullptr?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1431
Git commit 8825c01b15a3ca850cc0fa565f1c2fa483df6bbe by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 17/09/2021 at 13:33. Pushed by apol into branch 'master'. tablet: Fix disconnecting the tablet while the pen is still in proximity libinput will send release and proximity out events after the device is disconnected. This just takes into account that tablet might be nullptr. M +3 -1 src/input.cpp https://invent.kde.org/plasma/kwin/commit/8825c01b15a3ca850cc0fa565f1c2fa483df6bbe
Git commit 0cce8bab42c5d3e53c09f5c104a863cbdd9b441d by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 17/09/2021 at 13:35. Pushed by apol into branch 'Plasma/5.23'. tablet: Fix disconnecting the tablet while the pen is still in proximity libinput will send release and proximity out events after the device is disconnected. This just takes into account that tablet might be nullptr. (cherry picked from commit 8825c01b15a3ca850cc0fa565f1c2fa483df6bbe) M +3 -1 src/input.cpp https://invent.kde.org/plasma/kwin/commit/0cce8bab42c5d3e53c09f5c104a863cbdd9b441d