Opening mscx file consistently crashes Musescore

• Dec 3, 2023 - 20:01

When I open the attached file, MuseScore crashes consistently for me on MacOS Sonoma 14.1.2 (apple silicon). I've attached the crash log. MuseScore OS: macOS 14.1, Arch.: x86_64, MuseScore version (64-bit): 4.1.1-232071203, revision: e4d1ddf

Attachment Size
crashlog.txt 102.91 KB
BasicBeat.mscx 8.99 KB


Has that score been generated by something other than MuseScore?
I see this tag:
<metaTag name="pydrumscoreVersion">0.0.6</metaTag>
and Tabs rather than 2 spaces for indenting
And this looks suspicious too:

<museScore version="4">

A code fix top prevent the crash would be easy

diff --git a/libmscore/scorefile.cpp b/libmscore/scorefile.cpp
index b44a2b3d9c..4bef5ba653 100644
--- a/libmscore/scorefile.cpp
+++ b/libmscore/scorefile.cpp
@@ -1054,7 +1054,7 @@ Score::FileError MasterScore::read1(XmlReader& e, bool ignoreVersionError)
             if ( == "museScore") {
                   const QString& version = e.attribute("version");
                   QStringList sl = version.split('.');
-                  setMscVersion(sl[0].toInt() * 100 + sl[1].toInt());
+                  setMscVersion(sl[0].toInt() * 100 + (sl.size() > 1 ? sl[1].toInt() : 0));
                   if (!ignoreVersionError) {
                         if (mscVersion() > MSCVERSION)

The question is whether it is worth the effort, just to be able to read an invalid mscx file

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