Skip to main content
Topic: Qt5 applications crash with Segmentation fault on wacom tablet touch input (Read 682 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Qt5 applications crash with Segmentation fault on wacom tablet touch input

I am not sure if this is Artix related or upstream related:

I have a Lenovo m14t monitor with multitouch and stylus. It has a wacom tablet, and the stylus is an active one with battery, pressure sensitivity and two buttons: One "stylus button" and the other turns it into an eraser.

When I use it under Xorg with the wacom driver from the xf86-input-wacom project, any Qt5 based application I tried so far crashes with a Segmentation fault as soon as I touch the touchscreen with my finger (it does not so on stylus input).

This tried for the following software:
  • marble-qt, version 2.2.20
  • kate, version 21.08.2
  • krusader, version 2.7.2
  • dolphin, version 21.08.2
  • digikam, version 7.3.01
  • qt5ct, version 1.5

Underlying qt5-base libraries are version 5.15.2+kde+r237, from Artix Linux; see below.

As an example, here for marble-qt a gdb run:

Start it with gdb marble-qt, input run on gdb's command line, waiting until the programme is up, produces the following output:

Code: [Select]
Starting program: /usr/bin/marble-qt 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffda7e5640 (LWP 10845)]
[New Thread 0x7fffc8151640 (LWP 10846)]
[New Thread 0x7fffbffff640 (LWP 10847)]
[New Thread 0x7fffb3fff640 (LWP 10848)]
[New Thread 0x7fffa7fff640 (LWP 10849)]
[New Thread 0x7fff9bfff640 (LWP 10850)]
[Thread 0x7fff9bfff640 (LWP 10850) exited]
[New Thread 0x7fff9bfff640 (LWP 10851)]
[Detaching after fork from child process 10852]
[Detaching after fork from child process 10853]
[Detaching after fork from child process 10854]
[New Thread 0x7fff8ffff640 (LWP 10857)]
[New Thread 0x7fff83fff640 (LWP 10858)]
[New Thread 0x7fff77fff640 (LWP 10859)]
[New Thread 0x7fff6bfff640 (LWP 10860)]
[New Thread 0x7fff5ffff640 (LWP 10861)]
[New Thread 0x7fff5bffe640 (LWP 10862)]
[New Thread 0x7fff3fffd640 (LWP 10865)]
[New Thread 0x7fff47fff640 (LWP 10863)]
[New Thread 0x7fff43ffe640 (LWP 10864)]
[New Thread 0x7fff37ffb640 (LWP 10867)]
[New Thread 0x7fff3bffc640 (LWP 10866)]
[New Thread 0x7fff23fff640 (LWP 10868)]
[New Thread 0x7fff17fff640 (LWP 10869)]
[New Thread 0x7fff03fff640 (LWP 10870)]
[Thread 0x7fff03fff640 (LWP 10870) exited]
[New Thread 0x7fff03fff640 (LWP 10871)]
[Thread 0x7fff03fff640 (LWP 10871) exited]
[New Thread 0x7fff03fff640 (LWP 10872)]
[New Thread 0x7ffeffffe640 (LWP 10873)]
[New Thread 0x7ffef3fff640 (LWP 10874)]
[Detaching after fork from child process 10875]
[New Thread 0x7ffee7fff640 (LWP 10876)]
[New Thread 0x7ffedbfff640 (LWP 10881)]
[New Thread 0x7ffecffff640 (LWP 10885)]
[New Thread 0x7ffec3fff640 (LWP 10894)]
[New Thread 0x7ffeb7fff640 (LWP 10909)]
[New Thread 0x7ffeabfff640 (LWP 10910)]
[New Thread 0x7ffe9ffff640 (LWP 10911)]
[New Thread 0x7ffe93fff640 (LWP 10912)]
[New Thread 0x7ffe8fffe640 (LWP 10913)]
[Thread 0x7ffe9ffff640 (LWP 10911) exited]
[New Thread 0x7ffe9ffff640 (LWP 10914)]
[New Thread 0x7ffe83fff640 (LWP 10915)]
[Thread 0x7ffe93fff640 (LWP 10912) exited]
[New Thread 0x7ffe93fff640 (LWP 10916)]
[New Thread 0x7ffe77fff640 (LWP 10917)]
[Thread 0x7ffe9ffff640 (LWP 10914) exited]
[New Thread 0x7ffe9ffff640 (LWP 10918)]
[Thread 0x7ffe93fff640 (LWP 10916) exited]
[New Thread 0x7ffe73ffe640 (LWP 10919)]
[New Thread 0x7ffe93fff640 (LWP 10920)]
[Thread 0x7ffe73ffe640 (LWP 10919) exited]
[New Thread 0x7ffe73ffe640 (LWP 10921)]
[Thread 0x7ffe93fff640 (LWP 10920) exited]
[Thread 0x7ffe73ffe640 (LWP 10921) exited]
[New Thread 0x7ffe73ffe640 (LWP 10925)]
[Thread 0x7ffeb7fff640 (LWP 10909) exited]
[New Thread 0x7ffeb7fff640 (LWP 10937)]
[New Thread 0x7ffe93fff640 (LWP 10938)]
[New Thread 0x7ffe6fffd640 (LWP 10939)]
[New Thread 0x7ffe6bffc640 (LWP 10940)]
[New Thread 0x7ffe67ffb640 (LWP 10941)]
[New Thread 0x7ffe63ffa640 (LWP 10942)]
[New Thread 0x7ffe5fff9640 (LWP 10943)]
[Thread 0x7ffe9ffff640 (LWP 10918) exited]
[Thread 0x7ffe83fff640 (LWP 10915) exited]
[Thread 0x7ffe8fffe640 (LWP 10913) exited]
[Thread 0x7ffe77fff640 (LWP 10917) exited]
[Thread 0x7fff3bffc640 (LWP 10866) exited]
[Thread 0x7fff5bffe640 (LWP 10862) exited]
[Thread 0x7fff5ffff640 (LWP 10861) exited]
[Thread 0x7fff43ffe640 (LWP 10864) exited]
[New Thread 0x7fff43ffe640 (LWP 11056)]
[Thread 0x7fff43ffe640 (LWP 11056) exited]

Now, when I touch the programme with my finger on the touchscreen, the following output comes:

Code: [Select]
Thread 1 "marble-qt" received signal SIGSEGV, Segmentation fault.
0x00007fffda91ab27 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () from /usr/lib/libQt5XcbQpa.so.5

Then, in the gdb command line, typing bt for "backtrace", yields the following:

Code: [Select]
#0  0x00007fffda91ab27 in QXcbConnection::xi2ProcessTouch(void*, QXcbWindow*) () at /usr/lib/libQt5XcbQpa.so.5
#1  0x00007fffda8e6dcf in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /usr/lib/libQt5XcbQpa.so.5
#2  0x00007fffda8e82d1 in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5XcbQpa.so.5
#3  0x00007fffda90f7f8 in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007ffff4e6909c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff4ebe7f9 in  () at /usr/lib/libglib-2.0.so.0
#6  0x00007ffff4e666e5 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#7  0x00007ffff6661a8a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#8  0x00007ffff6606a1b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#9  0x00007ffff660f208 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#10 0x000055555556a090 in  ()
#11 0x00007ffff5f6eb25 in __libc_start_main () at /usr/lib/libc.so.6
#12 0x000055555556ac8e in  ()

Typing cont for "continue" in gdb's command line then yields the following (leading to quitting of the software):

Code: [Select]
Continuing.
Couldn't get registers: No such process.
Couldn't get registers: No such process.
(gdb) [Thread 0x7ffe5fff9640 (LWP 10943) exited]
[Thread 0x7ffe63ffa640 (LWP 10942) exited]
[Thread 0x7ffe67ffb640 (LWP 10941) exited]
[Thread 0x7ffe6bffc640 (LWP 10940) exited]
[Thread 0x7ffe6fffd640 (LWP 10939) exited]
[Thread 0x7ffe93fff640 (LWP 10938) exited]
[Thread 0x7ffeb7fff640 (LWP 10937) exited]
[Thread 0x7ffe73ffe640 (LWP 10925) exited]
[Thread 0x7ffeabfff640 (LWP 10910) exited]
[Thread 0x7ffec3fff640 (LWP 10894) exited]
[Thread 0x7ffecffff640 (LWP 10885) exited]
[Thread 0x7ffedbfff640 (LWP 10881) exited]
[Thread 0x7ffee7fff640 (LWP 10876) exited]
[Thread 0x7ffef3fff640 (LWP 10874) exited]
[Thread 0x7ffeffffe640 (LWP 10873) exited]
[Thread 0x7fff03fff640 (LWP 10872) exited]
[Thread 0x7fff17fff640 (LWP 10869) exited]
[Thread 0x7fff23fff640 (LWP 10868) exited]
[Thread 0x7fff37ffb640 (LWP 10867) exited]
[Thread 0x7fff3fffd640 (LWP 10865) exited]
[Thread 0x7fff47fff640 (LWP 10863) exited]
[Thread 0x7fff6bfff640 (LWP 10860) exited]
[Thread 0x7fff77fff640 (LWP 10859) exited]
[Thread 0x7fff83fff640 (LWP 10858) exited]
[Thread 0x7fff8ffff640 (LWP 10857) exited]
[Thread 0x7fff9bfff640 (LWP 10851) exited]
[Thread 0x7fffa7fff640 (LWP 10849) exited]
[Thread 0x7fffb3fff640 (LWP 10848) exited]
[Thread 0x7fffc8151640 (LWP 10846) exited]
[Thread 0x7fffda7e5640 (LWP 10845) exited]
[Thread 0x7fffdb1d8140 (LWP 10838) exited]

Then when I want to quit gdb it still prints the warning

Code: [Select]
A debugging session is active.

Inferior 1 [process 10838] will be killed.

Quit anyway? (y or n)

but the only useful to do I seem to find is to just quit.



System information:

  • Operating system: Artix Linux with OpenRC,
  • Version of marble-qt:
    • 2.2.20
    • Using Marble Library version 21.04
    • Users Qt version 5.15.2
  • /usr/lib/libQt5XcbQpa.so.5 and /usr/lib/libQt5Core.so.5 belong to package qt5-base, version 5.15.2+kde+r237-1, from the Artix Linux 'world' repository.
  • Kernel version: 5.14-pf5,
  • Xorg -version: X.Org X Server 1.20.13
  • Version of package xf86-input-wacom: 0.40.0-1.1
  • lsusb:
    Code: [Select]
    Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 127: ID 2d1f:524c Wacom Taiwan Information Co. Ltd. Pen and multitouch sensor
    Bus 001 Device 124: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
    Bus 001 Device 005: ID 8087:0a2a Intel Corp. Bluetooth wireless interface
    Bus 001 Device 003: ID 6080:8061 AMR-4630-XXX-0- 0-1023 USB KEYBOARD
    Bus 001 Device 108: ID 04b3:301e IBM Corp. IBM USB Travel Keyboard with Ultra Nav
    Bus 001 Device 107: ID 04b3:3016 IBM Corp. UltraNav Keyboard Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • lsusb -vv -d 2d1f:524c: See here,
  • xinput --list:
    Code: [Select]
    ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer              id=4 [slave  pointer  (2)]
    ⎜   ↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD Mouse id=13 [slave  pointer  (2)]
    ⎜   ↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav Mouse id=9 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor Stylus stylus id=16 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor Stylus eraser id=17 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor touch id=18 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor UNKNOWN touch id=19 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor UNKNOWN pad id=23 [slave  pointer  (2)]
    ⎜   ↳ Wacom Co.,Ltd. Pen and multitouch sensor touch id=24 [slave  pointer  (2)]
    ⎣ Virtual core keyboard                   id=3 [master keyboard (2)]
        ↳ Virtual core XTEST keyboard             id=5 [slave  keyboard (3)]
        ↳ Video Bus                               id=6 [slave  keyboard (3)]
        ↳ Power Button                            id=7 [slave  keyboard (3)]
        ↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD     id=12 [slave  keyboard (3)]
        ↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD System Control id=14 [slave  keyboard (3)]
        ↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD Consumer Control id=15 [slave  keyboard (3)]
        ↳ Intel HID events                        id=20 [slave  keyboard (3)]
        ↳ Intel HID 5 button array                id=21 [slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard            id=22 [slave  keyboard (3)]
        ↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav id=8 [slave  keyboard (3)]
        ↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav Consumer Control id=10 [slave  keyboard (3)]
        ↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav System Control id=11 [slave  keyboard (3)]
  • xinput --list --long for the six wacom devices: See here.
  • Here: Xorg.1.log) is a logfile from a fresh start of Xorg with X -retro -logverbose 6 :1, with doing some touch, then some stylus, then some touch, and then terminating the server with <CTRL>+<ALT>+<Backspace>.
  • Using touchscreen or stylus does not produce further log messages with verbosity 6, except (EE) Wacom Co.,Ltd. Pen and multitouch sensor Stylus eraser: usbParse: Ignoring event from invalid serial 0 when removing the pen.

 


Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input

Reply #3
Please reformat your post using phpBB and post logs to https://paste.artixlinux.org, so everything is easier to read.

I completely understand your wish, but for every system using it's own formatting guidelines it is too much work for me to make a seperate formatting everywhere. So I default to Markdown and I am sorry if I hit non-markdown-aware places.

Since Artix Linux uses gitea, the Markdown-formatting should be fine for reporting issues there (which in fact would be a more appropriate bug reporting place than a forum, in my opinion), and I would submit it there if I only could login at gitea.artixlinux.org (which I can't, and I cannot register).

Please provide a proper bug tracking system, and then I might be willing to adapt formatting to it. In the end reporting bugs is not for my sake, but a service from me for the sake of the project.

EDIT: Finally I did it anyway. Thanks for noting.

Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input

Reply #4
P.S.: Does not happen when the touchscreen is used with libinput driver instead of xf86-input-wacom. But libinput does not seem to expose as many features, e.g. I could not get multitouch working within the short time I tried it.