Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.14.2, 5.15.2, 6.2.0, 6.4
-
None
-
macOS Big Sur 11.5.2
-
-
0359381bc78fb69999d3c687d617858f9666c0aa
Description
Reproduction:
Run the attached QML file and just click on the window. It crashes immediately. Reproducible %100.
What happens:
Setting the parent of a quick item invalidates its scene graph nodes :
https://code.woboq.org/qt6/qtdeclarative/src/quick/items/qquickwindow.cpp.html#1704
But those items are cached in QQuickAnimatorJob:
And the cache is not updated after the deletion hence QQuickAnimatorJob accesses a dangling pointer :
https://code.woboq.org/qt5/qtdeclarative/src/quick/util/qquickanimatorjob.cpp.html#415
The stack trace is almost same as the one mentioned in this issue : QTBUG-43294
However I don't see the markDirty() call at the end. I've attached the traces.
Fix:
The issue is fixed if we update the QQuickAnimatorJob cache. The proposed patch in QTBUG-43294 ( https://codereview.qt-project.org/c/qt/qtdeclarative/+/101974 ) properly fixes the issue. I guess the author was bitten by something else and thought that that's not a correct fix and abandoned his diff.
Can we just resurrect that patch ? If not, I can send a new one.