Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
QDS 2.2 RC1, QDS 3.3
-
None
Description
Closing live preview on mac crashes the qml process.
The Application Output window shows:
15:15:53: The program has unexpectedly finished.
15:15:53: /Users/knud/src/qt/qt6.2/install_debug/bin/qml crashed.
15:15:53: The process was ended forcefully.
15:15:53: /Users/knud/src/qt/qt6.2/install_debug/bin/qml crashed.
and shortly thereafter a system dialog pops up, mentioning that "qml quit unexpectedly" that I have to close by pressing a button.
The reason seems to be in QQmlMetaType::unregisterInternalCompositeType. In the last call
of this function QQmlMetaTypeDataPtr is invalid "default constructed". Wrapping the following calls in an if statement, checking for validity of data (like below) seems to solve the issue for me.
qqmlmetatype.cpp:600
if (auto data = QQmlMetaTypeDataPtr(); data.isValid()) { if (QQmlValueType *vt = data->metaTypeToValueType.take(metaType.id())) delete vt; if (QQmlValueType *vt = data->metaTypeToValueType.take(listMetaType.id())) delete vt; }
Attachments
Issue Links
- depends on
-
QTBUG-96629 Live Preview crashes on close on macOS
-
- Closed
-