Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
5.15.2
-
Arch Linux
Description
SUMMARY
Simulating touch events via uinput and rapidly removing and adding a simulated device back while sending input events crashes any Qt program (I have tested so far at least, which includes KDE programs like Konsole, KCharselect as well as Subsurface). Programs like firefox or xterm are unaffected.
STEPS TO REPRODUCE
- Create a simulated touch screen via uinput for example like that: https://github.com/H-M-H/Weylus/blob/1c6837d85c7bf7db3c2524f19d21cf7a4f6bf84a/lib/linux/uinput.c#L185-L247
- Delete the device.
- Create it anew.
- Send touch events all the time.
Backtrace I got from KCharSelect via KDE's crash report dialog:
#4 0x00007ff8f1e0a4f3 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () from /usr/lib/libQt5XcbQpa.so.5 #5 0x00007ff8f1ddb84f in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () from /usr/lib/libQt5XcbQpa.so.5 #6 0x00007ff8f1ddcc69 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5XcbQpa.so.5 #7 0x00007ff8f1e00164 in ?? () from /usr/lib/libQt5XcbQpa.so.5 #8 0x00007ff8f4a62b84 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #9 0x00007ff8f4ab6c21 in ?? () from /usr/lib/libglib-2.0.so.0 #10 0x00007ff8f4a613b1 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #11 0x00007ff8f6283691 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #12 0x00007ff8f62293ac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5 #13 0x00007ff8f6231844 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5 #14 0x000055db93c547c5 in ?? () #15 0x00007ff8f5bf0b25 in __libc_start_main () from /usr/lib/libc.so.6 #16 0x000055db93c5488e in ?? () [Inferior 1 (process 6631) detached]
Attached is the output of `libinput debug-events` during the crash.
I originally reported this to the KDE team, but they referred me here: https://bugs.kde.org/show_bug.cgi?id=434733
Attachments
Issue Links
- relates to
-
QTBUG-119030 xcb plugin mixes up touch events for multiple windows
- Closed
-
QTBUG-94190 Support x11 standalone mode with window manager functions
- Reported
-
QTBUG-35968 support native event in qtestlib
- Open