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

QtQuick 3D leaks memory after destroying View3D

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 6.4.1, 6.5.0 Beta1
    • 6.3.1
    • Quick: 3D
    • None
    • All
    • b335ecdb84 (qt/qtquick3d/dev) 48b7caaabe (qt/qtquick3d/6.4) 48b7caaabe (qt/tqtc-qtquick3d/6.4) b335ecdb84 (qt/tqtc-qtquick3d/dev) 48b7caaabe (qt/qtquick3d/6.4.1) 48b7caaabe (qt/tqtc-qtquick3d/6.4.1)
    • 2022 Qt Quick 3D: Week 39-40, 2022 Qt Quick 3D: Week 41-42

      As the description says, if you destroy a `View3D` its `QSSGRenderGraphObject` nodes will be leaked because they are scheduled for deletion with `QQuick3DObjectPrivate::derefSceneManager()` but `QQuick3DSceneManager::cleanupNodes()` never runs to reap zombie nodes.

      The attached app demonstrates the issue, run it as `qmlscene6 test.qml` and monitor RAM usage of the qmlscene process, it constantly grows.

      The memory leak has been spotted in https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/188.

        1. test.qml
          1 kB
          Vlad Zahorodnii
        2. Screenshot_20220708_000109.png
          396 kB
          Vlad Zahorodnii
        For Gerrit Dashboard: QTBUG-104843
        # Subject Branch Project Status CR V

            jokarlss Jonas Karlsson
            zzag Vlad Zahorodnii
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes