Details
Description
The following code crashes:
import QtQuick import QtQuick.Window Window { id: top width: 640 height: 480 visible: true title: qsTr("Hello World") property int test: 1 Component { id: comp Item { width: { width = test * 100 } } } Loader { sourceComponent: comp width: 100 } }
Stack trace:
1 QPropertyBindingPrivate::hasCustomVTable qproperty_p.h 400 0x7fffbe86c4a3 2 QQmlObjectCreator::finalize qqmlobjectcreator.cpp 1473 0x7fffb2a2b780 3 QQmlIncubatorPrivate::incubate qqmlincubator.cpp 346 0x7fffb29b326a 4 QQmlEnginePrivate::incubate qqmlincubator.cpp 55 0x7fffb29b1f25 5 QQmlComponent::create qqmlcomponent.cpp 1429 0x7fffb286e758 6 QQuickLoaderPrivate::_q_sourceLoaded qquickloader.cpp 743 0x7fffa4ba6f7e 7 QQuickLoaderPrivate::load qquickloader.cpp 605 0x7fffa4ba5d53 8 QQuickLoader::componentComplete qquickloader.cpp 803 0x7fffa4ba4657 9 QQmlObjectCreator::finalize qqmlobjectcreator.cpp 1498 0x7fffb2a2b9ac 10 QQmlComponentPrivate::complete qqmlcomponent.cpp 1149 0x7fffb2872deb 11 QQmlComponentPrivate::completeCreate qqmlcomponent.cpp 1253 0x7fffb28716fb 12 QQmlComponent::completeCreate qqmlcomponent.cpp 1231 0x7fffb286e273 13 QQmlComponentPrivate::createWithProperties qqmlcomponent.cpp 959 0x7fffb2873df5 14 QQmlComponent::create qqmlcomponent.cpp 908 0x7fffb286e055 15 QQmlApplicationEnginePrivate::finishLoad qqmlapplicationengine.cpp 135 0x7fffb282bb4b 16 QQmlApplicationEnginePrivate::ensureLoadingFinishes qqmlapplicationengine.cpp 163 0x7fffb282bdee 17 QQmlApplicationEnginePrivate::startLoad qqmlapplicationengine.cpp 110 0x7fffb282b5bb 18 QQmlApplicationEngine::load qqmlapplicationengine.cpp 324 0x7fffb282a52e 19 main main.cpp 16 0x7ff6452633db 20 qtEntryPoint qtentrypoint_win.cpp 50 0x7ff64526f1b7 ... <More>
The context here is an attempt at setting properties without creating a binding, to work around QTBUG-117641.
When googling for this, the following suggestion comes up: https://stackoverflow.com/a/64947495
It's possible this was a hack that worked in Qt 5 for random reasons, but it probably shouldn't crash, so I thought it was worth reporting.
Attachments
Issue Links
- resulted from
-
QTBUG-117641 Loader and loaded item sizes can get unsynchronized
- Closed