Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: dreieck on 18 October 2021, 21:08:54

Title: Qt5 applications crash with Segmentation fault on wacom tablet touch input
Post by: dreieck on 18 October 2021, 21:08:54
I am not sure if this is Artix related or upstream related:

I have a Lenovo m14t monitor (https://www.lenovo.com/us/en/p/accessories-and-software/monitors/office/62a3uar1us) 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 (https://github.com/linuxwacom/xf86-input-wacom), 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:

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:

Title: Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input
Post by: strajder on 18 October 2021, 21:18:55
Please reformat your post using phpBB (https://en.wikipedia.org/wiki/PhpBB) and post logs to https://paste.artixlinux.org, so everything is easier to read.
Title: Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input
Post by: dreieck on 18 October 2021, 21:31:53
I am not sure if this is Artix related or upstream related:

I now also reported upstram: [-> Here (https://bugreports.qt.io/browse/QTBUG-97603)].
Title: Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input
Post by: dreieck on 18 October 2021, 21:37:08
Please reformat your post using phpBB (https://en.wikipedia.org/wiki/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.
Title: Re: Qt5 applications crash with Segmentation fault on wacom tablet touch input
Post by: dreieck on 18 October 2021, 22:24:59
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.