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

QQuickPainterItem memory leak when update is called on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.12.6
    • Quick: Other
    • Qt 5.12.6 (installed from maintenance tool), Mac OS 10.14.6, XCode 11.3.1, iOS 13.3
    • iOS/tvOS/watchOS

    Description

      Hi,

      I believe I have discovered a memory leak on QQuickPaintedItem on iOS. I was having a huge memory increase on iOS, something that I couldn't observe on Windows or OSX (didn't test on Android yet). 

      In my applications I use QQuickPaintedItem for custom graphics a lot. After commenting a lot of code of my application I have isolated the problem. 

      Attached is a simple project that illustrates how QQuickPaintedItem starts growing in memory usage second by second when update is being called.

      If update() inside the timerEvent is not called, the memory does not grow.

      To test, run qmake on this project and generate the xcode project:

      ~/Qt/5.12.6/ios/bin/qmake ~/workspace/painteditembug/painteditembug.pro
      

      and then run and check the memory usage panel.

      Them, run the same example but with line 9 of PaintedItem.cpp commented out.

      Let me know if you need further information.

      Best regards,

      Nuno

      Attachments

        1. leaks1.png
          leaks1.png
          287 kB
        2. leaks2.png
          leaks2.png
          284 kB
        3. nanopainteditem.zip
          1.83 MB
        4. painteditembug.zip
          4 kB
        5. Screenshot 2020-01-29 at 08.45.33.png
          Screenshot 2020-01-29 at 08.45.33.png
          488 kB
        6. Screenshot 2020-02-18 at 15.57.45.png
          Screenshot 2020-02-18 at 15.57.45.png
          334 kB
        7. Screenshot 2020-02-18 at 22.24.34.png
          Screenshot 2020-02-18 at 22.24.34.png
          4.18 MB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            w00t Robin Burchell
            sinosoidal Nuno Santos
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes