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

QFileDialog::getOpenFileName crashes with heap-use-after-free

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P4: Low
    • None
    • 5.8.0
    • Crashes on two different computers, both with Linux Mint 17.2 64-bit.
      gcc: Ubuntu 4.8.4-2ubuntu1~14.04.3
      libgtk-3-0:amd64: 3.10.8~8+qiana
      libgtk2.0-0:amd64: 2.24.23-0ubuntu1.2

    Description

      As seen in "BugTest.txt", AddressSanitizer reports a "heap-use-after-free" when this line is called:

      filename=QFileDialog::getOpenFileName(this, tr("Open"), QString(), tr("Files (.)"));

      Adding the home directory as a location suggestion makes no difference. This worked fine in Qt 5.7.0 and some versions before. I made a simple test case to show that it crashes with Debug and Release 5.8.0 and works with Debug and Release 5.7.0. It might be a GTK issue, somehow.

      Attachments

        1. BugTest.txt
          6 kB
        2. BugTest.tar.gz
          831 kB

        Issue Links

          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
              saffire Arthur Matteson
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes