Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.3.1, 5.6
Description
When a QQuickWidget has a context property as itself, the program crashes when the QQuickWidget is deleted.
* thread #1: tid = 0xd347c, 0x00000001017ac00b QtQml_debug`QQmlData::destroyed(this=0x0000000104b4af60, object=0x0000000104b45df0) + 59 at qqmlengine.cpp:1583, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x50) frame #0: 0x00000001017ac00b QtQml_debug`QQmlData::destroyed(this=0x0000000104b4af60, object=0x0000000104b45df0) + 59 at qqmlengine.cpp:1583 1579 1580 void QQmlData::destroyed(QObject *object) 1581 { 1582 if (nextContextObject) -> 1583 nextContextObject->prevContextObject = prevContextObject; 1584 if (prevContextObject) 1585 *prevContextObject = nextContextObject; 1586 1587 QQmlAbstractBinding *binding = bindings;
main.cpp
#include <QApplication> #include <QQmlContext> #include <QQuickWidget> int main(int argc, char** argv) { QApplication app(argc, argv); QQuickWidget* widget = new QQuickWidget(); widget->rootContext()->setContextProperty("widget", widget); widget->setSource(QUrl("qrc:/widget.qml")); widget->deleteLater(); return app.exec(); }
widget.qml
import QtQuick 2.2
Rectangle {
Connections {
target: widget
}
}
Attachments
Issue Links
- is duplicated by
-
QTBUG-54313 QQuickWidget: crash on application exit
- Closed
-
QTBUG-54076 [Reg 5.5-5.6]: QtQuickWidget crashes on destruction if context property is set to itself
- Closed