Bug 445470 - On X11, Plasma crashes in QWindowSystemInterface::TouchPoint>::isEmpty() after every touch to touch screen
Summary: On X11, Plasma crashes in QWindowSystemInterface::TouchPoint>::isEmpty() afte...
Status: REOPENED
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 5.23.2
Platform: openSUSE Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: drkonqi, X11-only
Depends on:
Blocks:
 
Reported: 2021-11-14 11:50 UTC by Serge
Modified: 2025-02-24 17:58 UTC (History)
5 users (show)

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


Attachments
New crash information added by DrKonqi (3.21 KB, text/plain)
2022-01-16 11:20 UTC, Serge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Serge 2021-11-14 11:50:02 UTC
Application: plasmashell (5.23.2)

Qt Version: 5.15.2
Frameworks Version: 5.87.0
Operating System: Linux 5.14.14-2-default x86_64
Windowing System: X11
Distribution: "openSUSE Tumbleweed"
DrKonqi: 5.23.2 [KCrashBackend]

-- Information about the crash:
- What I was doing when the application crashed:
Touching touchscreen on secondary monitor Lenovo M14T connected to USB-C
Plasma crashes if I use both: finger and stylus.

- Unusual behavior I noticed:
It does every touch. After first it still can recover, after second can crash unrecoverable - ctrl+shift+backspace helps to come back.
Plasma doesn't want to set proper frames for the touchscreen.
Doesn't matter what I do - Plasma thinks that main screen (laptop) and secondary screen (touch) are both touch screens.
Because of that it has logarythmic shift between screen touch point and actual mouse pointer:
Main screen is the left one and touch is the right one.
If I touch left side of touch screen - pointer will appear almost at left side of the main screen, if I touch right screen of touch - pointer will be almost there.

- Custom settings of the application:
Any settings to wacom tablets in Settings changing nothing,
Settings can be saved, and after reopen they still there, but they don't change any behaviour of touch screen.

The crash can be reproduced every time.

-- Backtrace:
Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = {<No data fields>}}
[KCrash Handler]
#6  QHash<int, QWindowSystemInterface::TouchPoint>::isEmpty (this=0x8) at ../../../../include/QtCore/../../src/corelib/tools/qhash.h:285
#7  QXcbConnection::xi2ProcessTouch (this=0x5560bfe36d20, xiDevEvent=0x7fb588016bc0, platformWindow=0x5560c081cd60) at qxcbconnection_xi2.cpp:627
#8  0x00007fb58d31460d in QXcbConnection::handleXcbEvent (this=this@entry=0x5560bfe36d20, event=event@entry=0x7fb588016bc0) at qxcbconnection.cpp:670
#9  0x00007fb58d315aa6 in QXcbConnection::processXcbEvents (this=0x5560bfe36d20, flags=...) at qxcbconnection.cpp:1014
#10 0x00007fb58d33bd03 in xcbSourceDispatch (source=source@entry=0x5560bff64840) at qxcbeventdispatcher.cpp:103
#11 0x00007fb5900b2d4f in g_main_dispatch (context=0x7fb588005000) at ../glib/gmain.c:3381
#12 g_main_context_dispatch (context=0x7fb588005000) at ../glib/gmain.c:4099
#13 0x00007fb5900b30d8 in g_main_context_iterate (context=context@entry=0x7fb588005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#14 0x00007fb5900b318f in g_main_context_iteration (context=0x7fb588005000, may_block=1) at ../glib/gmain.c:4240
#15 0x00007fb591da4ed4 in QEventDispatcherGlib::processEvents (this=0x5560bff79cc0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#16 0x00007fb591d4c3fb in QEventLoop::exec (this=this@entry=0x7ffcfe1d4290, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#17 0x00007fb591d546e0 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#18 0x00007fb59219e18c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#19 0x00007fb592ae69f5 in QApplication::exec () at kernel/qapplication.cpp:2824
#20 0x00005560bf04a3e6 in main (argc=<optimized out>, argv=0x7ffcfe1d4450) at /usr/src/debug/plasma5-workspace-5.23.2-1.1.x86_64/shell/main.cpp:238
[Inferior 1 (process 2024) detached]

Possible duplicates by query: bug 445464, bug 444745, bug 443059, bug 442681, bug 440516.

Reported using DrKonqi
Comment 1 Nate Graham 2021-11-23 18:59:30 UTC
No idea what could be causing this. Works for me on Wayland.
Comment 2 Serge 2022-01-16 11:20:01 UTC
Created attachment 145533 [details]
New crash information added by DrKonqi

plasmashell (5.23.5) using Qt 5.15.2

- What I was doing when the application crashed:
Touching screen on secondary screen connected via USB-C to my laptop.
Secondary screen is Lenovo Think Vision t14

- Custom settings of the application:
Plasma settings doesn't save configuration of the attached screen as touch device (recognising as wacom tablet)
Every time I disconnect it from laptop and connect again - I have to configure secondary screen from the scratch as touch tablet.

Summary:
As a display unit - secondary screen works perfectly. No complains.
As a touch device:
Plasma doesn't save settings for touch device(wacom) if to disconnect touch screen
Plasma crashing if to touch screen.
If to use any other app - touches don't crash anything.
Only in desktop view - no apps on scendary screen - plasma crashing from touching screen.

-- Backtrace (Reduced):
#6  QHash<int, QWindowSystemInterface::TouchPoint>::isEmpty (this=0x8) at ../../../../include/QtCore/../../src/corelib/tools/qhash.h:285
#7  QXcbConnection::xi2ProcessTouch (this=0x5609726b4cf0, xiDevEvent=0x7fe32c020e10, platformWindow=0x5609733df970) at qxcbconnection_xi2.cpp:627
#8  0x00007fe3317745ed in QXcbConnection::handleXcbEvent (this=this@entry=0x5609726b4cf0, event=event@entry=0x7fe32c020e10) at qxcbconnection.cpp:670
#9  0x00007fe331775a86 in QXcbConnection::processXcbEvents (this=0x5609726b4cf0, flags=...) at qxcbconnection.cpp:1014
#10 0x00007fe33179bcf3 in xcbSourceDispatch (source=source@entry=0x5609727eec70) at qxcbeventdispatcher.cpp:103
Comment 3 Marco Martin 2022-01-18 10:25:22 UTC
Pasting bt inline

Application: Plasma (plasmashell), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  QHash<int, QWindowSystemInterface::TouchPoint>::isEmpty (this=0x8) at ../../../../include/QtCore/../../src/corelib/tools/qhash.h:285
#7  QXcbConnection::xi2ProcessTouch (this=0x5609726b4cf0, xiDevEvent=0x7fe32c020e10, platformWindow=0x5609733df970) at qxcbconnection_xi2.cpp:627
#8  0x00007fe3317745ed in QXcbConnection::handleXcbEvent (this=this@entry=0x5609726b4cf0, event=event@entry=0x7fe32c020e10) at qxcbconnection.cpp:670
#9  0x00007fe331775a86 in QXcbConnection::processXcbEvents (this=0x5609726b4cf0, flags=...) at qxcbconnection.cpp:1014
#10 0x00007fe33179bcf3 in xcbSourceDispatch (source=source@entry=0x5609727eec70) at qxcbeventdispatcher.cpp:103
#11 0x00007fe33462bd9f in g_main_dispatch (context=0x7fe32c005000) at ../glib/gmain.c:3381
#12 g_main_context_dispatch (context=0x7fe32c005000) at ../glib/gmain.c:4099
#13 0x00007fe33462c128 in g_main_context_iterate (context=context@entry=0x7fe32c005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#14 0x00007fe33462c1df in g_main_context_iteration (context=0x7fe32c005000, may_block=1) at ../glib/gmain.c:4240
#15 0x00007fe336348294 in QEventDispatcherGlib::processEvents (this=0x5609727fa2c0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#16 0x00007fe3362ef7bb in QEventLoop::exec (this=this@entry=0x7fff5c0b9410, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#17 0x00007fe3362f7aa0 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#18 0x00007fe33674123c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1867
#19 0x00007fe33708c9f5 in QApplication::exec () at kernel/qapplication.cpp:2824
#20 0x0000560970ae2366 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/plasma5-workspace-5.23.5-1.1.x86_64/shell/main.cpp:238
[Inferior 1 (process 4245) detached]

Possible duplicates by query: bug 447752, bug 446947, bug 445470, bug 445464, bug 444745.
Comment 4 Marco Martin 2022-01-18 10:26:31 UTC
hmm, may be an incomplete Qt update with different pieces of Qt from different versions?
Comment 5 Nate Graham 2024-02-22 20:52:32 UTC
Thank you again for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with either Plasma 5.27 (the current LTS version) or Plasma 6.0 (to be released in one week)? Thanks a lot!
Comment 6 Bug Janitor Service 2024-03-08 03:46:57 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2024-03-23 03:46:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 8 Philipp 2024-07-11 09:32:28 UTC
I have exactly the same problem, also with this ThinkVision M14t USB-C touchscreen as only monitor on a machine with newly installed Kubuntu 24.04. Packages are up-to-date.

The touchscreen is not usable at all. Whenever it is touched, the focused application simply crashes. If no application window is open, it is plasmashell that crashes. I wasn't able to get the the crash handler (drkonqi) to accept the backtrace of the application (even when setting DEBUGINFOD_URLS), but here we go, for example with Konsole:

```
Application: Konsole (konsole), signal: Segmentation fault

[KCrash Handler]
#4  0x000074e6373084a9 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#5  0x000074e6372d31e5 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6  0x000074e6372d479f in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7  0x000074e6372fccff in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8  0x000074e63bb145b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x000074e63bb73717 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x000074e63bb13a53 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x000074e63db35279 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x000074e63dad6a7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x000074e63dadf3e8 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x000063766ec679d4 in ?? ()
#15 0x000074e63d02a1ca in __libc_start_call_main (main=main@entry=0x63766ec65d00, argc=argc@entry=3, argv=argv@entry=0x7ffd5577b238) at ../sysdeps/nptl/libc_start_call_main.h:58
#16 0x000074e63d02a28b in __libc_start_main_impl (main=0x63766ec65d00, argc=3, argv=0x7ffd5577b238, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd5577b228) at ../csu/libc-start.c:360
#17 0x000063766ec682b5 in ?? ()
[Inferior 1 (process 3610) detached]
```




Or with the system monitor:

```
Application: Konsole (konsole), signal: Segmentation fault

[KCrash Handler]
#4  0x000074e6373084a9 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#5  0x000074e6372d31e5 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6  0x000074e6372d479f in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7  0x000074e6372fccff in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8  0x000074e63bb145b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x000074e63bb73717 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x000074e63bb13a53 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x000074e63db35279 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x000074e63dad6a7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x000074e63dadf3e8 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x000063766ec679d4 in ?? ()
#15 0x000074e63d02a1ca in __libc_start_call_main (main=main@entry=0x63766ec65d00, argc=argc@entry=3, argv=argv@entry=0x7ffd5577b238) at ../sysdeps/nptl/libc_start_call_main.h:58
#16 0x000074e63d02a28b in __libc_start_main_impl (main=0x63766ec65d00, argc=3, argv=0x7ffd5577b238, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd5577b228) at ../csu/libc-start.c:360
#17 0x000063766ec682b5 in ?? ()
[Inferior 1 (process 3610) detached]
```


Or drkonqi-coredump-gui:

```
Application: DrKonqi Intensive Care (drkonqi-coredump-gui), signal: Segmentation fault

[KCrash Handler]
#4  0x00007ba15d3084a9 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#5  0x00007ba15d2d31e5 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6  0x00007ba15d2d479f in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#7  0x00007ba15d2fccff in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#8  0x00007ba15ff145b5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007ba15ff73717 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ba15ff13a53 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ba161735279 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ba1616d6a7b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ba1616df3e8 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x0000636c646ac256 in ?? ()
#15 0x00007ba160c2a1ca in __libc_start_call_main (main=main@entry=0x636c646ab050, argc=argc@entry=1, argv=argv@entry=0x7ffe3709df38) at ../sysdeps/nptl/libc_start_call_main.h:58
#16 0x00007ba160c2a28b in __libc_start_main_impl (main=0x636c646ab050, argc=1, argv=0x7ffe3709df38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe3709df28) at ../csu/libc-start.c:360
#17 0x0000636c646acd05 in ?? ()
[Inferior 1 (process 4803) detached]
```


Unfortunately, I can't convince drkonqi to show me the backtrace of the `plasmashell` crash again, I probably dismissed it too often. The same issue does **not** happen in Firefox and probably also not in other non-Qt applications.

The issue does **not** appear when using a Wayland session (plasma-workspace-wayland package), but then the physical keyboard is not working anymore after touching the screen for the first time; I also observe this behavior on the login screen (SDDM) and therefore can't login after touching the screen once.

This is the lsusb output of the screen:
```
Bus 003 Device 007: ID 2d1f:524c Wacom Taiwan Information Co. Ltd. Pen and multitouch sensor
```

System/version information:
```
Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-38-generic (64-bit)
Graphics Platform: X11
Processors: 18 × Intel® Core? Ultra 5 125H
Memory: 31.0 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
```
Comment 9 Philipp 2024-07-22 08:54:28 UTC
Update: The problem seems to be specific to this type of touchscreen (Lenovo M14t), which apparently registers itself as a Wacom tablet. Another ASUS desktop touchscreen with USB-C does not exhibit this problem on the same machine and works. So I don't know what actually is causing the crash, but maybe this exposes some bug, since a touchscreen certainly should not be able to crash any currently focused application.
Comment 10 Nate Graham 2024-07-23 16:30:02 UTC
There's no Plasma code in the backtrace; it seems to be crashing deep in Qt.

The fact that you see different issues on Wayland suggests that there may be a driver issue with the touchscreen itself that causes it to misbehave in different ways depending on the environment's implementation.

FWIW I have a Lenovo ThinkPad X1 Yoga gen 4 with a built-in touchscreen that also registers itself as a Wacom tablet, and it doesn't exhibit any of these issues.
Comment 11 TraceyC 2025-02-24 17:58:57 UTC
Adding the x11-only keyword