Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.9.3, 5.15.2
-
2b52a997ce3679ac4c94b7c117b0ea11c1523b60 (qt/qtdeclarative/5.12)
Description
As a consequence of QTBUG-62243, QML singletons that import their own module trigger a cyclic dependency. While the cycle is "ignored" at load time due to the fix for QTBUG-64017, it is not ignored on the disk cache level and results in a constant case of "Checksum mismatch for cached version of mysingleton.qml".
Perhaps the fix involves the following step that when type-compiling such a singleton, the resulting byte code and data structures mut not depend on the singleton itself. This may disable certain compile-time optimizations and result in run-time lookups instead (not sure where yet if any) and require detecting the cycle correctly at the import cache level.
Edit: I thought this may be related to the circular dependency handling on the type loader level, but it doesn't look like it is. But there must be another way of triggering this though.
Attachments
Issue Links
- relates to
-
QTBUG-64017 Regression [5.9.1 -> 5.9.2] QQmlApplicationEngine.load() fails silently
- Closed
-
QTBUG-42169 QML engine stuck in infinite loop when two components have mutual reference to each other
- Closed
- resulted from
-
QTBUG-62243 Regression [5.7.1 -> 5.9.1] Changing a QML singleton creates a cache issue leading to undefined behaviours
- Closed