Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.2.0 RC
-
None
Description
Closing live preview on macOS from within Design Studio 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
- is required for
-
QDS-5105 Live Preview crashes on close on macOS
- Closed