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

SceneLoader leaks memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.9.0, 5.9.1
    • Qt3D
    • None
    • 102fef33f14f21869725ebfa46d57c31ec4002b3

    Description

      Summary

      The memory allocated by SceneLoader isn't released when the Scene3D it belongs to is destroyed.

      What did you do?

      I use a Loader to load a QML Scene3D. This scene only comprises an Entity that is filled by a SceneLoader component, which reads an OBJ file.

      What did you expect to happen?

      I expect the memory allocated by the SceneLoader to be freed.

      What happened instead?

      The (huge amount) of memory allocated isn't freed. This can lead to gigabytes of memory lost after a few minutes, which makes the SceneLoader component unusable.

      Attached project

      The attached simple project loads and unloads a Scene3D that have a SceneLoader every 5 seconds, so you can see the the memory consumption growing indefinitely.

      According to the Valgrind dump it seems that it's the memory allocated by the Assimp plugin that is not freed.

      Attachments

        1. sceneloader-leak.zip
          4.33 MB
          Aurélien Brooke

        Issue Links

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

          Activity

            People

              anmaatta Antti Määttä
              abrooke Aurélien Brooke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes