Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.0.0
-
None
-
Ubuntu 10.04.2 LTS; Qt 5.0.0 built from qt-everywhere-opensource-src-5.0.0.tar.gz
-
d005c5c80b6fff835adb350a780d80348549bc64
Description
If the garbage collector runs while a QML object is being created, then the var properties of that object become unusable. They cannot be directly referenced and always have a value of undefined, even after being assigned a different value.
The attached example achieves this by forcing garbage collection in an on*Changed handler, but it can happen by chance in long running applications. Run the attached example with "qmlscene bug01.qml". Only the console output of the example is interesting.
I suspect it is related to QQmlVMEMetaObject's weak reference to the var properties array, but I don't know enough about the internals to fix it.