Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Xorg VRAM leak because of Qt/OpenGL Application
Forum Updated to NodeBB v4.3 + New Features

Xorg VRAM leak because of Qt/OpenGL Application

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 4 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mwestphal
    wrote on last edited by
    #3

    Well, the minimum example require sadly to build the whole application. I was not able to reproduce it using only our QOpenGLWindow reimplementation. That is why I'm not sure that it is a bug in Qt our in our Application.

    aha_1980A 1 Reply Last reply
    0
    • M mwestphal

      Well, the minimum example require sadly to build the whole application. I was not able to reproduce it using only our QOpenGLWindow reimplementation. That is why I'm not sure that it is a bug in Qt our in our Application.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #4

      @mwestphal if you have a commercial licence, then the support can help you with priblems in your code also.

      if you use open source Qt, then you have to provide a minimal example for bug reports, i.e. track down the actual problem (which is always good!)

      Qt has to stay free or it will die.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mwestphal
        wrote on last edited by
        #5

        Since the whole application is OpenSource and Free, I do not have any problem with sharing it, it is simply that I am afraid that a example with this so many lines will not be considered and quite hard to pin down for somebody not knowing the code.

        I was more hoping for advices on how this could happen as it would help me track it down.

        sierdzioS 1 Reply Last reply
        0
        • M mwestphal

          Since the whole application is OpenSource and Free, I do not have any problem with sharing it, it is simply that I am afraid that a example with this so many lines will not be considered and quite hard to pin down for somebody not knowing the code.

          I was more hoping for advices on how this could happen as it would help me track it down.

          sierdzioS Online
          sierdzioS Online
          sierdzio
          Moderators
          wrote on last edited by aha_1980
          #6

          @mwestphal said in Xorg VRAM leak because of Qt/OpenGL Application:

          I was more hoping for advices on how this could happen as it would help me track it down.

          I have zero experience with QOpenGLWidget and containerWidget, unfortunately.

          One recommendation that springs to mind when leaks are a problem: run your app through valgrind and / or clang's address sanitizer. They are often quite good at finding such issues.

          (Z(:^

          1 Reply Last reply
          1
          • M Offline
            M Offline
            mwestphal
            wrote on last edited by
            #7

            @sierdzio : That we did, and actually corrected a few memory leaks in the process. But not related to this issue.
            Since this is Xorg leaking on the VRAM, it would have been quite a wild luck to fix it this way anyway.

            1 Reply Last reply
            0
            • W Offline
              W Offline
              wrosecrans
              wrote on last edited by
              #8

              Have you tried building your application with Address Sanitizer to see if it helps you identify the source of the leak? It is very helpful with that sort of problem.

              aha_1980A 1 Reply Last reply
              0
              • W wrosecrans

                Have you tried building your application with Address Sanitizer to see if it helps you identify the source of the leak? It is very helpful with that sort of problem.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @wrosecrans have you read the last two responses? ;)

                Qt has to stay free or it will die.

                W 1 Reply Last reply
                0
                • aha_1980A aha_1980

                  @wrosecrans have you read the last two responses? ;)

                  W Offline
                  W Offline
                  wrosecrans
                  wrote on last edited by
                  #10

                  @aha_1980

                  D'oh. Maybe this plan to give up drinking so much coffee in the mornings wasn't such a great idea. :)

                  I guess I just think using Address Sanitizer is advice that is worth repeating! One thing I will add is that it's not clang specific -- recent versions of gcc will accept the same command line parameters to use it.

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    mwestphal
                    wrote on last edited by mwestphal
                    #11

                    The issue was resolved thanks to an intense debugging session.

                    The leak was caused by NULL parenting the parent of the windowContainer containing the QVTKOpenGLWindow just before deletion.

                    This code was here before when we used a QOpenGLWidget and it caused no issue. In any case, NULL parenting a widget before deletion is useless so removing the line resolve the issue.

                    This leak shouldn't happen though, even in this situation, so I have opened a Qt issue to report it.

                    1 Reply Last reply
                    4
                    • sierdzioS Online
                      sierdzioS Online
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #12

                      Great, thanks for investigating and reporting the bug!

                      (Z(:^

                      1 Reply Last reply
                      1
                      • S SamiV123 referenced this topic on

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved