Musescore crashes when trying to open a specifc score

• Dec 13, 2019 - 10:11

Hello, I'm having some trouble with Musescore in that it immediately crashes whenever I try to open a particular score I've been working on. I'm currently on version 3.3.4. I've tried uninstalling and reinstalling Musescore and also tried downgrading to 3.2.3, but the problem persists across those versions. I've also tried opening the score on another computer but it still crashes. Any help would be appreciated.

The problematic score is attached below.

Attachment Size
Never_Gonna_Give_You_Up.mscz 64.95 KB

Comments

In reply to by Jojo-Schmitz

Debugger tells me the crash comes about trying to sort out some lyric melisma line, apparently we can't figure out where the end is.

I can't really sort out exactly what the problem in the file is, but I was able to work around the crash in the debugger and save a "fixed" version. Any problematic melisma lines will need fixing. I also had to remove the parts as they were corrupt (possibly the source of the lyrics problem). The score will still claim to be corrupt, but will load. First order of business will be to fix the corruptions or else I suspect you'll run into the same problems again.

Attachment Size
Never_Gonna_Give_You_Up - Fixed.mscz 34.18 KB

Stack trace:
1 Ms::Element::parent element.h 188 0xe2d8ac
2 Ms::Segment::measure segment.h 129 0xe2eb5f
3 Ms::Segment::tick segment.cpp 218 0x92855b
4 Ms::LyricsLine::layout lyricsline.cpp 156 0xa663a6
5 Ms::LyricsLine::layoutSystem lyricsline.cpp 182 0xa66669
6 Ms::Score::layoutSystemElements layout.cpp 3948 0x8ba68c
7 Ms::Score::collectSystem layout.cpp 3564 0x8b78ae
8 Ms::LayoutContext::collectPage layout.cpp 4186 0x8bba87
9 Ms::LayoutContext::layout layout.cpp 4506 0x8bd7a1
10 Ms::Score::doLayoutRange layout.cpp 4494 0x8bd6ff
11 Ms::Score::update cmd.cpp 302 0x9c6562
12 Ms::Score::update score.h 726 0xd4e9ea
13 Ms::readScore file.cpp 2356 0x6543e7
14 Ms::MuseScore::readScore file.cpp 349 0x6428be
15 Ms::MuseScore::openScore file.cpp 327 0x642784
16 Ms::MuseScore::loadFiles file.cpp 304 0x642432
17 Ms::MuseScore::cmd musescore.cpp 6089 0x500e48
18 Ms::MuseScore::cmd musescore.cpp 5887 0x4fffd1
19 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 867 0x41067f
20 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c82e55
...

Changing the code to prevent the crash (not sure at all whether that'd be the right fix though)

diff --git a/libmscore/lyricsline.cpp b/libmscore/lyricsline.cpp
index 2884e98a0..6386c0a1c 100644
--- a/libmscore/lyricsline.cpp
+++ b/libmscore/lyricsline.cpp
@@ -153,6 +153,8 @@ void LyricsLine::layout()
                   }
             // Spanner::computeEndElement() will actually ignore this value and use the (earlier) lyrics()->endTick() instead
             // still, for consistency with other lines, we should set the ticks for this to the computed (later) value
-            setTicks(s->tick() - lyricsStartTick);
+            if (s)
+                  setTicks(s->tick() - lyricsStartTick);
             }
       else {                                    // dash(es)

results in the score to get loaded but reporting a bunch of corruptions:

Measure 5, Staff 1 incomplete. Expected: 4/4; Found: 10/8
Measure 6, Staff 1 incomplete. Expected: 4/4; Found: 9/8
Measure 9, Staff 1 incomplete. Expected: 4/4; Found: 19/16
Measure 18, Staff 1 incomplete. Expected: 4/4; Found: 19/16
Measure 19, Staff 1 incomplete. Expected: 4/4; Found: 23/16
Measure 21, Staff 1 incomplete. Expected: 4/4; Found: 19/16
Measure 22, Staff 1 incomplete. Expected: 4/4; Found: 19/16
Measure 26, Staff 1 incomplete. Expected: 4/4; Found: 10/8

While looking at it more closely it crashed (most likely at autosave, probably due to a corrupt part, likely Tenor) on a failed assertion:
Fatal: ASSERT: "first()" in file ...\libmscore\measure.cpp, line 1924 (...\libmscore\measure.cpp:1924, )

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