Crash when opening Musescore 2.3 file

• Nov 19, 2019 - 02:46

Every time I try to open the attached Musescore 2.3 file Musescore 3 crashes.
The same thing happened since version 3, 3.1, etc.

Attachment Size
2 Parcial_Au_III profe 2018.mscz 28.7 KB

Comments

Looks like there is an issue with the "leading space" set on some elements If you can, open the score in 2.3.2 and reset the leading space (it's not going to have the same effect in MuseScore 3 anyhow, most likely).

Stack trace:
1 Ms::Segment::read segment.cpp 855 0x927ccd
2 Ms::readMeasure read206.cpp 3334 0xa56998
3 Ms::readStaffContent read206.cpp 3468 0xa575aa
4 Ms::readScore read206.cpp 3650 0xa58a26
5 Ms::MasterScore::read206 read206.cpp 3976 0xa5a966
6 Ms::MasterScore::read1 scorefile.cpp 960 0x9f2c1b
7 Ms::MasterScore::loadCompressedMsc scorefile.cpp 822 0x9f1f66
8 Ms::MasterScore::loadMsc scorefile.cpp 874 0x9f22c1
9 Ms::MasterScore::loadMsc scorefile.cpp 865 0x9f21d4
10 Ms::readScore file.cpp 2270 0x652c66
11 Ms::MuseScore::readScore file.cpp 349 0x641722
12 Ms::MuseScore::openScore file.cpp 327 0x6415e8
13 Ms::MuseScore::loadFiles file.cpp 304 0x641296
14 Ms::MuseScore::cmd musescore.cpp 6068 0x4ffa16
15 Ms::MuseScore::cmd musescore.cpp 5866 0x4feb9f
16 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 867 0x4105bf
17 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c82e55
18 ZN12QActionGroup7hoveredEP7QAction 0x27dc4ee5

Simple fix:

diff --git a/libmscore/read206.cpp b/libmscore/read206.cpp
index 9fcd6e2ae..a97bb9cb0 100644
--- a/libmscore/read206.cpp
+++ b/libmscore/read206.cpp
@@ -3330,8 +3330,10 @@ static void readMeasure(Measure* m, int staffIdx, XmlReader& e)
                   beam->setParent(0);
                   e.addBeam(beam);
                   }
-            else if (tag == "Segment")
-                  segment->read(e);
+            else if (tag == "Segment") {
+                  if (segment) segment->read(e);
+                  else e.unknown();
+                  }
             else if (tag == "MeasureNumber") {
                   MeasureNumber* noText = new MeasureNumber(score);
                   readText206(e, noText, m);

Simple here means (of can mean) over-simplified too ;-)

Fixed score attached too

Now properly reported in #297326: Crash on opening Musescore 2.x file that uses leading space setting on the initial clef

Attachment Size
2 Parcial_Au_III profe 2018-3.3.2.mscz 28.17 KB

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