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

[Android]TapHandler crash while using the S-Pen

    XMLWordPrintable

Details

    • Android
    • 0ff8be24fc (qt/tqtc-qtdeclarative/5.15)
    • 2022wk26FOQtforAndroid, 2022wk28FOQtforAndroid

    Description

      If a TapHandler is used together with a Loader in a scenario like the one below and you tap using an S-Pen this will result in a fatal SIGSEGV 11 crash on Android.

      I came across this bug on the Samsung Galaxy Tab S6 SM-T865.

      import QtQuick 2.15
      import QtQuick.Window 2.15
      
      Window {
          width: 640; height: 480; visible: true; title: qsTr("Hello World");
      
          Loader{
              id: myLoader
              anchors.fill: parent
              sourceComponent: Rectangle{
                  width: parent.width/2; height: parent.height/2; anchors.centerIn: parent; color: "green";
      
                  TapHandler{
                      gesturePolicy: TapHandler.ReleaseWithinBounds // ==>> CRASH with S-PEN
                      //gesturePolicy: TapHandler.WithinBounds // ==>> CRASH with S-PEN
                      //gesturePolicy: TapHandler.DragThreshold // ==>> NO CRASH
                      onTapped:{
                          myLoader.active=false;
                      }
                  }
              }
          }
      }
      
      D ViewRootImpl@498d888[QtActivity]: ViewPostIme pointer 1
      W mple.untitled3: 0xebadde09 skipped times: 0
      F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4 in tid 19609 (qtMainLoopThrea), pid 19537 (mple.untitled31)
      D ViewRootImpl: updatePointerIcon pointerType = 20001, calling pid = 19537
      D InputManager: setPointerIconType iconId = 20001, callingPid = 19537
      

      However if you tap using the touchscreen or if you use the default gesturePolicy: TapHandler.DragThreshold, the app will not crash.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              samuelmira Samuel Mira
              adrian.gabureanu Adrian Gabureanu
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes