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

Please discard TapHandler events when taphandler enabled is set to false (TapHandler: invalid point id)

    XMLWordPrintable

Details

    • Linux/X11

    Description

      EDIT: Look at the last comment

      In the attached project I have added a small example with a table view and very basic event handling. There are only two event layers, explained as a flow in this mermaid graph:

      
      stateDiagram-v2
          s: Selected?
          tr: Timer Running?
          sc: Single Click
          dc: Double Click
          [*] --> TapHandler: Tap
          TapHandler --> s: Release
          s --> tr: Yes
          tr --> dc: Yes
          tr --> sc: No
          s --> sc: No
      
          cellSelect: Select Cells
          scrollSelect: Scroll Select
          restartTimer: Timer Restart
          [*] --> TapHandler: Press
          TapHandler --> DragHandler: Drag out of delegate
          DragHandler --> cellSelect: Drag Inside Table
          DragHandler --> scrollSelect: Drag Outside table
          cellSelect --> restartTimer
          scrollSelect --> restartTimer
          sc --> restartTimer
      
      

      This is not the only version I tried - I played around with grabPermissions, tried a version where the two handlers never share ownership of events at the same time, no matter what or how I configure the tapHandlers, one (the tapHandler) always gets stuck with an invalid event.

      The table in the example allows for column edit of multiple cells (thats why select dragging only selects within the column), but there are other table views with other combinations of flags (btw bug https://bugreports.qt.io/browse/QTBUG-114326 is very clearly visible in this test project, since the selection behavior in the table changes, when set to combined flag).

       
      1. Steps to reproduce:

       - Start example project

       - Start randomly clicking and dragging using a touchscreen (has to happen after a fresh build, if you already had this bug and didnt rebuild, the next time the application is started it is not reproducible, as far as I could test it)

      2. Observed Behavior

      • After a while (usualy takes me between 2 and 10 secs to break this, in some rare cases it happens on the first try) you wil see the following logs:
        qt.quick.touch.target: QQuickTapHandler(0x55a00a7a0200) pointId 4fe is missing from current event, but was neither canceled nor released
        qt.quick.touch.target: QQuickTapHandler(0x55a00a7b9490) pointId 4fe is missing from current event, but was neither canceled nor released
        qt.quick.touch.target: QQuickTapHandler(0x55a00a7a0200) pointId 4fe is missing from current event, but was neither canceled nor released
        qt.quick.touch.target: QQuickTapHandler(0x55a00a78a080) pointId 508 is missing from current event, but was neither canceled nor released
        

        - The TapHandler that is reporting the missing event is not the tapHandler the drag started in. For the duration of the drag, all tapHandlers in the delegates should be disabled by the event manager to avoid fighting for events in order to avoid exactly this problem (unsuccessfully, since it still hapens, just not during drag). It seems to happen either at the release event (when the drag handler becomes inactive and enables delegates again), or maybe if the drag is started really quickly - by a not-yet disabled handler of a neighbor cell, but that is only my speculation.

      • The cell the tapHandler belongs to is not clickable anymore (clicks only update the current property, not the select property)

      InvalidPointExample.zip

      EDIT: Looking through the issues, this is another example for:
      https://bugreports.qt.io/browse/QTBUG-113005
      https://bugreports.qt.io/browse/QTBUG-77646

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            r.vitanov Rosen Vitanov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes