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

QFileDialog not cleaned up when parent deleted

    XMLWordPrintable

Details

    • macOS
    • e73f35d9c (dev), e36e681a2 (6.5), a1045b2b0 (6.6), 061a83afc (tqtc/lts-6.2), 505ed52cd (dev), 115c7f591 (6.5), 9044a8e03 (6.6)

    Description

      Creating a native QFileDialog on macOS with a nested widget as parent (not the window) will crash the application if the parent widget is deleted before the dialog. 

      Steps to reproduce:

      • create a QFileDialog with a non-window widget as parent
      • delete the parent widget

      Expected behaviour:

      • widget and file dialog are gone

      Actual behaviour:

      • widget and file dialog are cleaned up
      • native file dialog is still visible
      • finishing the dialog now crashes the app (use after free)

       

      I added a simple example to showcase the issue.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            vjungbluth Victor Jungbluth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: