Summary: | kwin crashes when clicking on MPV with a pen | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Alexander <alexander.reimelt> |
Component: | input | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | telepathine |
Priority: | NOR | ||
Version: | 5.21.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/73b826a0725d8e82a326f7ce63b247edb302618b | Version Fixed In: | |
Attachments: |
small video for demonstration
kwin_wayland coredump fresh kwin 5.22 coredump first bt second bt pen input recording Backtrace from current git master |
Can't reproduce the issue in git master. Can you please install debug symbols for kwin and check coredumps after making kwin crash? Created attachment 139071 [details]
kwin_wayland coredump
I didn't manage to crash the entire session.
Created attachment 139253 [details]
fresh kwin 5.22 coredump
filename: kwin22.dump.tar.lzma Can you please provide the backtrace in text form? I don't think that I'll be able to get the backtrace from the coredump file as I have a different machine. you would need to run the following command in terminal gdb <path to executable> <path to coredump file> and then run "bt" in gdb Created attachment 139334 [details]
first bt
one crash created two core dumps
Created attachment 139335 [details]
second bt
Created attachment 141580 [details]
pen input recording
I recorded the input events with "libinput record", with them it should be reproducible everywhere.
two files one for each button
Created attachment 141879 [details]
Backtrace from current git master
I can reproduce this as well, with a Huion tablet.
I don't know how to make GDB show line numbers for functions called via std::bind, so here's the disassembly of the part around frame #1:
...
0x00007f0e976df57f <+95>: mov %ebp,%esi
0x00007f0e976df581 <+97>: call 0x7f0e97625150 <_ZN14KWaylandServer21TabletToolV2Interface10sendButtonEjb@plt>
=> 0x00007f0e976df586 <+102>: add $0x8,%rsp
0x00007f0e976df58a <+106>: mov $0x1,%eax
0x00007f0e976df58f <+111>: pop %rbx
...
Looks like this happened in kwin/src/input.cpp:1862
I rebuilt libwayland with debug symbols. Resource was a null pointer: #0 wl_resource_post_event (resource=0x0, opcode=17) at ../wayland-1.19.0/src/wayland-server.c:248 I attached GDB to KWin and checked where the null pointer came from in TabletToolV2InterfacePrivate::targetResource(). m_surface was not null, but later resourceMap().value(*client) returned 0x0. This happened because there was no check if the resource is valid before calling sendButton. I created a merge request: https://invent.kde.org/plasma/kwin/-/merge_requests/1461 Git commit 242de4373706324696a9bfe48b1ac9e2f7e2caa2 by Ash Blake. Committed on 26/09/2021 at 09:02. Pushed by apol into branch 'master'. tablet: Check if client is supported before sending tool button M +3 -0 src/input.cpp https://invent.kde.org/plasma/kwin/commit/242de4373706324696a9bfe48b1ac9e2f7e2caa2 Git commit 73b826a0725d8e82a326f7ce63b247edb302618b by Aleix Pol Gonzalez, on behalf of Ash Blake. Committed on 26/09/2021 at 23:24. Pushed by apol into branch 'Plasma/5.23'. tablet: Check if client is supported before sending tool button (cherry picked from commit 242de4373706324696a9bfe48b1ac9e2f7e2caa2) M +3 -0 src/input.cpp https://invent.kde.org/plasma/kwin/commit/73b826a0725d8e82a326f7ce63b247edb302618b |
Created attachment 138958 [details] small video for demonstration Clicking one of the two buttons on a Wacom pen crashes kwin instead of triggering right/left click action when hovering over MPV window. Operating System: openSUSE Tumbleweed 20210527 KDE Plasma Version: 5.21.5 KDE Frameworks Version: 5.82.0 Qt Version: 5.15.2 Kernel Version: 5.12.4-2-default OS Type: 64-bit Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 3700X 8-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: AMD Radeon RX 5700