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

QApplication leaks files



    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 6.8
    • Core: Other
    • None
    • Debian GNU/Linux 12 (bookworm)
    • Linux/Wayland


      We create a QApplication object and then destroy it.  It leaves behind open files after being destroyed.

      I ran into more issues then this one "bug".  See https://forum.qt.io/topic/154863/dso-plugin-qt6-widgets DSO Plugin Qt6 Widgets.  There is a lot of context in that discourse (link).  Like why do I want to create and then destroy the QApplication object.  Yes, I know there can only be 0 or 1 of them at a time in a given process.  I have a good reason for doing this, please read the above link.

      The attached C++ file has comments in it as to how to compile it on a GNU/Linux system; with lots of details.  Just cut/paste into a bash shell.  I tested that it works via cut/paste (about 3 commands in one cut/paste) into a shell.  When you run the compiled C++ program it shows the said file leak pretty clearly.  When I run it I count 12 files leaked.  It's 63 lines of code without the comments, and 195 lines of code with comments.  I do not have a patch to fix this "bug" yet.  I'm pretty sure that this will not even be considered a bug by the powers that be; but this at least points out that the QApplication object is not robust in the UNIX sense of robust.

      I should point out that it appears that making a new QApplication object after destroying an old one may be reusing some of these files, and so my use of Qt only effects my non-Qt code with what appears to be a fixed number of files leaked, no mater how many times I create and destroy a QApplication object.

      This is my first Qt bug substitution; so ya, I'm clueless.  If I'm not following protocol just tell me so.  Most of the things on this web page/form make no sense to me.



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



            thiago Thiago Macieira
            lance_arsenault Lance Arsenault
            0 Vote for this issue
            3 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes