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

QtQuick QML memory leak like a sieve on Windows - Menu bar only?

    XMLWordPrintable

Details

    Description

      If I open a default project with QtQuick Controls in Qt Creator and start that, the menu bar will pop up with a lag. Everytime I click the menu bar menu it adds about 20 Megabytes to the RAM footprint of the application (see Task manager). This can be repeated until the application dies on out of memory errors. If a menu entry is chosen and the menu is opened again, it won't leak more ram than it topped out to the last time the menu opened.

      Example:

      1) I open the menu. Memory usage jumps from 50 to 70
      2) I choose an item. RAM jumps down to about 68 MB
      3) I open the menu again. RAM jumps back to 70
      4) I close the menu without doing anything in it. Memory stays the same
      5) I open the menu again. Memory jumps another 20 MB up to 90.

      Additionally if the menu is opened on a screen to the left of the main screen (dual monitor setup) it complains like this:

      2015/10/22 23:20:49 qsgthreadedrenderloop.cpp:893: QSGThreadedRenderLoop: expose event received for window QQuickMenuPopupWindow(0x5fa83c30) with invalid geometry: QRect(-556,442 91x6) on QScreen(0x39168)

      It also often closes the menu directly when this happens which results in only the outline of the menu showing very briefly. If it doesn't it might try to open the menu on the main screen (if part of the form is on the main screen) even though that would be the wrong position for the menu. Sometimes it does actually open.

      I can say for sure this problem doesn't exist with Qt 5.1 as I've tried the Qt 5.1 creator and the menu pops up very fast and does not have this kind of memory footprint.

      EDIT: It does work fine on 5.4. When I spam the menu it still takes like a hundred kilobytes per click but that disappears again after I let it rest (I assume garbage collection kicks in?). The menu still seems to have a very slight delay but it works fine so far.

      Attachments

        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
              sinni800 Dennis Joachimsthaler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes