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

[REG 5.9.6->5.11.2] When one of many QScrollArea widgets with grabbed LeftMouseButtonGesture is destroyed, using others can cause a crash.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.1
    • 5.11.2
    • None
    • c4ee12589122923e680e8dd359c30f6dde370f54 (qt/qtbase/5.12)

    Description

      I wrote a code that creates a QScrollArea and a QLabel inside it, and then executes QScroller::grabGesture to enable gesture scrolling. As long as the full application has only one such a viewer ever created, everything works fine. However, if there is an option to create more, after closing and destroying one, trying the gesture on any other, either already existing or newly created, can cause the whole application to crash with segmentation fault. Using the scrollbars never cause a crash.

      This does not happen every time, but I can reproduce it about 1/3 of the time.

      To reproduce:

      • Compile and run the C++ example attached (with Qt 5.11.2).
      • Press the push button to create one or more new windows.
      • Try the gesture on them - it shall work.
      • Close one or more of the "viewer" windows.
      • Try the gesture on a window that was left open, or create a new one.
      • Expected behavior: the gesture still works, and there is no crash.
      • Observed behavior: just after trying the gesture, the application crashes.

      Tested configurations:

      • Qt 5.11.2, Windows 7 x86, binary MinGW distribution from qt.io - can reproduce
      • Qt 5.11.2, Arch Linux x86_64, binary distribution from package repository - can reproduce
      • Qt 5.9.6 and 5.6.3, Windows 7 x86, binary MinGW distribution from qt.io - can not reproduce, everything works as expected

      Attachments

        For Gerrit Dashboard: QTBUG-71232
        # Subject Branch Project Status CR V

        Activity

          People

            srutledg Shawn Rutledge
            simon_r simon_r
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes