Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.2, 6.2.3
-
None
-
-
d978f34dc (dev)
Description
During debugging of an application created using QML, which includes the Loader component, compiled in a debugging configuration in the QML object tree, ScreenInfo objects are accumulated in the program window object. After a critical memory consumption value, Qt creator crashes with the message malloc_consolidate(): invalid chunk size
Below is the code of a minimal program to reproduce the problem
import QtQuick 2.15 import QtQuick.Window 2.15 Window { id: page width: 640 height: 480 visible: true Loader { anchors.fill: parent id: loader } Component { id: c1 Rectangle { color: "red" } } Component { id: c2 Rectangle { color: "green" } } Timer { property bool c: false interval: 500 running: true repeat: true onTriggered: { if (c) { loader.sourceComponent = c1 } else { loader.sourceComponent = c2 } c = !c } } }
Playback steps
1. Build the project in a debug configuration
2. Run the project in debug mode
3. Switch to QML debugger mode
4. Pay attention to the tree of QML objects, new ScreenInfo objects will appear in the page object, the amount of memory consumed will increase.
Attachments
Issue Links
- relates to
-
QTBUG-94258 Qt: QML Iterate through listmodel in QML GridView - ScreenInfo getting created multiple time under RootWindow
-
- Reported
-
-
QTBUG-104404 QQmlContext::nameForObject() with ApplicationWindow causes creation of many QQuickScreenInfo objects
-
- Closed
-
For Gerrit Dashboard: QTBUG-127065 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
416942,12 | Avoid QQuickWindowImpl space leak | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |