Corrupted ~/.cache/Jami/qmlcache leads to application crashing (Qt)
Describe your environment
Please specify the following:
- OS: GNU/Linux
- Jami version: any recent jami-qt client
- What build you are using: Guix
Steps to reproduce
Not sure how to trigger the cache corruption, it seems to come from changes from the C++ code base and or Qt. When the condition occurs, it crashes consistenly.
- Can you reproduce the bug: at will
- Steps:
- get the qmlcache into a corrupted state (repro unknown) 2. try launching jami-qt
- Actual result: Qt crashes.
- Expected result: No crash, Jami runs.
Workaround:
rm -rf ~/.cache/Jami/qmlcache
We need to come up with safeguards against this serious problem. There are hints as to how to go about it at the end of https://bugreports.qt.io/browse/QTBUG-85967?jql=text%20~%20%22qmlcache%20crash%22:
Qt does not analyze all your properties to see if anything you use in QML changed in C++. That would be quite difficult. Incrementing the import versions should indeed help as that would also force you to change the QML code in order to import the new version. This, in turn, triggers a cache invalidation via a checksum mismatch on the QML code.