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
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-88408 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
321499,2 | Checking that QuickItems are not deleted while touch event delivering | 5.12 | qt/qtdeclarative | Status: NEW | -1 | 0 |
321566,1 | WIP Change QQuickWindowPrivate::pointerTargets() to return QList<QPointer> | dev | qt/qtdeclarative | Status: NEW | -2 | 0 |