Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12
-
None
Description
Method
QQuickWindowPrivate::deliverPressOrReleaseEvent
Build array of QQuickItems under touch points
QVector<QQuickItem *> targetItems
then iterate through this array and send events, but during this job some QQuickItem could be destroyed, which leads us to corrupted pointers in the array.
Problem detected when we bind 'Item.layer.enabled' to focus state, like in attached file
main.qml
Try to launch 'main.qml' on device with multitouch support, then press one red rectangle with one finger and second with another finger while first rectangle still pressed - application crash immediately.
In my opinion best solution is to change QVector<QQuickItem *> to QVector<QPoint<QQuickItem> > and check array items for 'null', but we also provide solution for exactly described case by using QQuickItemLayer::m_effect->deleteLater instead of delete it instantly
There a change for it:
https://codereview.qt-project.org/c/qt/qtdeclarative/+/321499