Running musescore in converter mode crashes
Running musescore (latest code from master) in converter mode (using the options file.mscz -o file.png
) crashes. Stack trace:
1 QString::QString qstring.h 906 0xdcc158
2 Ms::Workspace::name workspace.h 54 0xe1c1c8
3 Ms::MuseScore::preferencesChanged musescore.cpp 537 0x49654d
4 Ms::MuseScore::MuseScore musescore.cpp 1404 0x49cc87
5 main musescore.cpp 6358 0x4bf5b5
Culprit apparently is 064156c
Possible fix is to change mscore/musescore.cpp, line 537 from
if (preferences.getString(PREF_APP_WORKSPACE) != Workspace::currentWorkspace->name()) {
to
if (Workspace::currentWorkspace && preferences.getString(PREF_APP_WORKSPACE) != Workspace::currentWorkspace->name()) {
or
if (!converterMode && preferences.getString(PREF_APP_WORKSPACE) != Workspace::currentWorkspace->name()) {
Or not to call preferencesChanged() in mscore/musescore.cpp, line 1404, if in converterMode, after all that mode should not change any preferences at all, or should it? So change from
preferencesChanged();
to
if (!converterMode) preferencesChanged();
or
if (!MScore::noGui) preferencesChanged();
All these variants fix this crash, I like the last best (all prefs set in that method seem to deal with GUI settings, and this check additionally covers plugin mode, which IMHO should crash currently too), but I'm not sure about possible unwanted side effects.
Strange that mtest or vtest didn't catch this?
Comments
See https://github.com/musescore/MuseScore/pull/3704
Fixed in branch master, commit ce936d608a
Fix #273066: Crash in converter mode
after 064156c
Fixed in branch master, commit eb18c5cf44
Merge pull request #3704 from Jojo-Schmitz/converterMode
Fix #273066: Crash in converter mode
Automatically closed -- issue fixed for 2 weeks with no activity.