1

I have a adafruit PiTfT 2.8" 320x240 capacitive touch display running on a raspberry pi. I cross compiled my executable under linux, where I also cross-compiled qt. If I run the enclosed example program, and touch the screen repeatedly, I get a segfault.

[9;0]TouchPointPressed without previous release event QQuickEventPoint(accepted:false state:Pressed scenePos:QPointF(327.487,183.617) id:2000002 timeHeld:0)
Segmentation fault

Here is what gdb tells me

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x72e90440 (LWP 1317)]
0x75aebf70 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0 0x75aebf70 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x75aed324 in __GI_abort () at abort.c:89
#2 0x75b27954 in __libc_message (do_abort=<optimized out>,
fmt=0x75bdd6e8 "*** Error in `%s': %s: 0x%s ***\n")
at ../sysdeps/posix/libc_fatal.c:175
#3 0x75b2db80 in malloc_printerr (action=1,
str=0x75bdd924 "double free or corruption (fasttop)", ptr=<optimized out>)
at malloc.c:4996
#4 0x75b2eb24 in _int_free (av=<optimized out>, p=<optimized out>,
have_lock=-1) at malloc.c:3840
#5 0x75e82a98 in QMapDataBase::freeTree(QMapNodeBase*, int) ()
from /usr/local/qt5pi/lib/libQt5Core.so.5
#6 0x76830204 in QWindowSystemInterfacePrivate::fromNativeTouchPoints(QList<QWindowSystemInterface::TouchPoint> const&, QWindow const*, unsigned char, QEvent::Type*) () from /usr/local/qt5pi/lib/libQt5Gui.so.5
#7 0x71d0aaf0 in ?? ()
asked May 29, 2018 at 7:44
3
  • It might be worth running gdb as root; apparently that can cause the stack trace you got. Commented May 29, 2018 at 13:15
  • I tried but the crash still occurs Commented May 29, 2018 at 13:28
  • The first segfault you got implies that the touchscreen registered a touch without a first touch being removed... If you tap the screen slowly do you get the segfault??? Commented May 29, 2018 at 18:39

1 Answer 1

2

I found a way to avoid the crash: Compiling Qt with libinput support and using libinput instead of evdev.

answered Oct 3, 2018 at 18:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.