Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.9.0, 5.11.0
-
None
-
38bac80aea1c2bd58acb10000e9a3daa65bba503 (qt/qtdeclarative/5.12)
Description
I'm trying to use QMetaObject::invokeMethod with QueuedConnection to safely pass control from one thread to another. If invokeMethod (on a secondary thread) happens simultaneously with QQmlPropertyMap::insert (on main thread), Qt may crash. There seems to be no locking around the code which modifies the QMetaObject.
If it's not fixable, then it should at least be documented what conditions need to be met in order to safely use invokeMethod with QueuedConnection from a different thread.
Minimal test-case attached.
Attachments
For Gerrit Dashboard: QTBUG-70915 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
271229,4 | Document that QQmlPropertyMap's meta object is not threadsafe | 5.12 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
271230,4 | Point out that dynamically modified meta objects are not threadsafe | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |