Probably best fix would be to check after mscore/musescore.cpp, line 2092
whether cs is valid, otherwise any of those saveXxx methods get call with and invalid pointer.
The XmlValidationErrorDialog gets called in mscore/importxml.cpp, line 589
and needs to get protected by an 'if (MScore::noGui) || ...' or some such
Maybe accompanied by a new option to allow to try to load apparently invalid XML files?
Thanks for the pointers, made it simple to fix. We could indeed add an option to control whether or not we try to import a MusicXML file that fails validation, but on the face of it, I don't see any good reason not to just try.
Comments
The crash when calling MuseScore in converter mode with a non-existing file has the following stack trace:
0 Ms::Score::setPrinting score.h 707 0xaa432a
1 Ms::MuseScore::savePng file.cpp 2286 0x56f7e1
2 Ms::MuseScore::savePng file.cpp 2275 0x56f788
3 Ms::processNonGui musescore.cpp 2128 0x4705db
4 main musescore.cpp 4885 0x480f9d
Probably best fix would be to check after mscore/musescore.cpp, line 2092 whether cs is valid, otherwise any of those saveXxx methods get call with and invalid pointer.
The XmlValidationErrorDialog gets called in mscore/importxml.cpp, line 589 and needs to get protected by an 'if (MScore::noGui) || ...' or some such
Maybe accompanied by a new option to allow to try to load apparently invalid XML files?
https://github.com/musescore/MuseScore/pull/1665
Thanks for the pointers, made it simple to fix. We could indeed add an option to control whether or not we try to import a MusicXML file that fails validation, but on the face of it, I don't see any good reason not to just try.
Fixed in d2eec226bd
Automatically closed -- issue fixed for 2 weeks with no activity.