Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63584

evdevtouch can detect multiple devices and that can cause crashes

    XMLWordPrintable

    Details

    • Commits:
      23d73208524d3ab2166121d08594da88e6b4460b (qt/qtbase/5.15) 3315a400fcfe355f5056f65aade20454cbdd4928 (qt/qtbase/5.12)

      Description

      In case linux kernel creates multiple device nodes for touch screen, all of them are detected by evdevtouch and that creates multiple threads and that causes missed touches and crashes because there is only a single static QMap for tracking active touch points and not guarded by mutexes. It is declared in
      qtbase/src/gui/kernel/qwindowsysteminterface.cpp, line 528:
      Q_GLOBAL_STATIC(PointIdMap, g_pointIdMap)

      Workaround is to use setenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "/dev/input/touchscreen0", 0); it disables the automatic touch device detection and forces to use the defined one.

      It would be nice if the evdev touch would use only one device, even if more are detected, to prevent crashes.

        Attachments

        1. gdb.txt
          14 kB
          Johan Helsing
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            rakeller Rainer Keller
            Reporter:
            karimpinter Karim Pinter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes