Crashes after update due to qmlcache

• Aug 11, 2020 - 23:18

This does not seem well known, but MuseScore reliably crashes after update (from 3.4.2 to 3.5.0, on Linux, even with -F after completing "Startup Wizard", and even with an .mscz argument) at "Initializing main window" due to stale qmlcache: https://bugreports.qt.io/browse/QTBUG-85967

The solution for Nixpkgs was to wrap it with export QML_DISABLE_DISK_CACHE=1: https://github.com/NixOS/nixpkgs/blob/9441eac8/pkgs/applications/audio/…


Comments

In reply to by Jojo-Schmitz

OK, I have created https://musescore.org/en/node/309025 . The issue affects MuseScore built from Nixpkgs with Qt 5.12.7 and 5.12.9, but not the AppImages. (They happen to regenerate all qmlcache files when ran. Maybe Qt 5.9 understands that the caches are incompatible but Qt 5.12 does not. Maybe I'll try to build MuseScore from Nixpkgs with Qt 5.9, but it's not very easy because Nixpkgs have removed Qt 5.9, it does not build with the most recent gcc, and if I downgrade Nixpkgs, Qt apps do not run due to incompatible OpenGL driver. I'll probably have to downgrade my system to test.)

In reply to by orivej

I'm using the AppImage, so, 5.9.8.

But maybe I'm misunderstanding, I thought at first you were saying it always crashed on Linux. Are you actually saying it always crashes after a very specific sequence of events involving running 3.4.2, running 3.5, and reverting one or both to factory settings? I have both AppImages on my system, and did indeed once see a crash running 3.5 immediately after 3.4.2. But it then worked perfectly after that; it didn't crash continually.

In reply to by Marc Sabatella

I have tried AppImages today and have not seen them crash; this issue may be absent in Qt 5.9.

Qt saves processed .qml files in ~/.cache/X/Y/qmlcache/Z.qmlc (where Z is a hash of the .qml filename) and attempts to load these .qmlc files instead of processing .qml files again when the application starts. In general it discards stale or incompatible .qmlc files and regenerates them if they were generated with a different version of Qt or from different .qml files. When I launch first 3.4.2 and then 3.5.0 (or first 3.5.0 and then 3.4.2 — the order does not matter) from AppImages, I observe that indeed all .qmlc files are regenerated, and MuseScore launches successfully. However when I launch these versions built from source (with Qt 5.12.7 or 5.12.9), Qt does not regenerate some .qmlc files, attempts to load them and crashes. This happens all the time, with or without factory reset: if I delete qmlcache and launch 3.4.2 first than 3.5.0 will always crash, and if I delete qmlcache and launch 3.5.0 first than 3.4.2 will always crash. (The crash happens at "Initializing main window", so a factory reset allows me to complete the configuration wizard before the crash.)

Do you still have an unanswered question? Please log in first to post your question.