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

QApplication leaks files when loaded and unloaded as a DSO plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.12
    • Widgets: Main Window
    • None
    • Linux/Wayland

    Description

      Please look at https://bugreports.qt.io/browse/QTBUG-122824 which is titled QApplication leaks files.

      This is just a more complicated version of QTBUG-122824 https://bugreports.qt.io/browse/QTBUG-122824

      PLEASE READ https://bugreports.qt.io/browse/QTBUG-122824. The idea is the same but it turns out the unloading the Qt and friend libraries does not close the leaked files. See and compile that attached C++ source files. The 3 files are used to compile two binary ELF files, one that is a regular binary program that does not link with Qt (and friend libraries) and the other one is a DSO (dynamic shared object) library that links with the Qt and friend libraries. Compiling instructions are in the comments of the source files (just 4 bash command lines). Running the program "qt6_fileLeak_test" loads the DSO file which creates a QApplication object and prints to stdout what's going on.

      Attachments

        1. qt6_fileLeak_DSO.cpp
          2 kB
        2. qt6_fileLeak_test.cpp
          2 kB
        3. qt6_fileLeak_test.h
          1 kB
        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
            lance_arsenault Lance Arsenault
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes