Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
None
-
6.5.0 Beta1
-
None
Description
To reproduce:
1) Create new Quick application with this code:
import QtQuick import QtQuick.Window Window { Item { id: item width: 0 + 10 onWidthChanged: { console.log("START") var parentItem = item.parent; var rootDialog = item; while(parentItem) { rootDialog = parentItem; parentItem = parentItem.parent } console.log("END") } } }
2) Set compiler to MSVC2019
3) Enable Quick Compiler
4) Set build mode to "Debug"
Build and run the application -> crash in the while loop
error: this pointer is nullptr:
Qt6Quickd.dll!QQuickItemPrivate::q_func() Line 224 C++
Qt6Quickd.dll!QQuickItemPrivate::data() Line 3656 C++
Qt6Quickd.dll!QQuickItem::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 1650 C++
Qt6Qmld.dll!QQmlPrivate::AOTCompiledContext::getValueLookup(unsigned int index, void * value, void * target) Line 1691 C++
5) Comment the code in onWidthChanged
Build and run the application -> no crash
6) Close the application
-> crash
Works without crashes in Qt 6.4