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

Crash when canceling gesture without target in scene

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.0
    • 4.6.2
    • Widgets: GraphicsView
    • None
    • 47d3d5569e25d0e88259e1f0448d87325da0ab6a

    Description

      When a gesture "G" is triggered by events sent to QGV->viewport() (for example, QMouseEvent), and that trigger further causes cancelling of other gestures via cancel policy (QGesture::CancelAllInContext), and there is no recipient for the gesture "G" under the hotspot, Qt will assert/crash.

      The crash is in QGraphicsScenePrivate::cancelGesturesForChildren, caused by null originalItem (Q_ASSERTed in debug builds).

      The gesture "G" should be delivered to the scene, and if there is no recipient for the gesture, no cancels should happen. I.e. remove assertion and return if originalItem is null.

      Test case attached.

      Attachments

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

        Activity

          People

            zander tho (closed Nokia identity) (Inactive)
            mikkohar Mikko Harju
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes