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

Valgrind reports QOpenGLWidget / QOpenGLContext memory leaks

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.15.1, 5.15.9, 6.4.3, 6.6.3, 6.7.0
    • GUI: OpenGL
    • Linux/Wayland, Linux/X11

    Description

      We have a team investigating memory issues in our display applications.   One thread of investigation is looking into memory leak in QOpenGL module classes.  The team has  created a sample program where QOpenGLWidget instances are created with a parent widget (this is key) and then the instances and parent are destroyed.   The memory footprint is reported before and after the creation of the QOpenGLWIdget instances.  There is another sample program in which QOpenGLContext instances are constructed and the create() method called.  Then the instances are destroyed.  The memory footprint is reported before and after the creation of the contexts.   There appears to be leaked memory in both test cases.   Are we missing something obvious or is there lost OpenGL resources or other memory lost somewhere?

      I have run this on various version of Qt 5 and Qt 6 as reported in affected versions.

      QOpenGLWidgetLeaks-main.zip

      Attachments

        1. leaks.txt
          22.09 MB
          Greg Schultz
        2. leaks-1.txt
          19.28 MB
          Greg Schultz
        3. qopenglwidgetleaks_valgrind (2).zip
          1.62 MB
          Greg Schultz
        4. QOpenGLWidgetLeaks-main.zip
          7 kB
          Greg Schultz
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tvete Paul Olav Tvete
            glschultz_jd Greg Schultz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes