Musescore 3 immediately crashes when opening score

• Jan 9, 2019 - 11:12
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Many
Severity
S1 - Blocker
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

As soon as I open this file, musescore 3 crashes before displaying anything or giving any message. I wonder if there is a triplet in bar 68 that became strange, whereby the file can't be loaded. I remember this from my last session.

Attachment Size
forest_vogel.mscz 117.12 KB

Comments

stack trace:
1 std::vector::begin stl_vector.h 573 0x100f3c0
2 std::vector::rend stl_vector.h 627 0x100f35c
3 Ms::System::lastMeasure system.cpp 906 0x95a2ff
4 Ms::Tie::slurPos tie.cpp 486 0x91ea42
5 Ms::Tie::layoutBack tie.cpp 653 0x91f49d
6 Ms::layoutTies layout.cpp 3109 0x897b30
7 Ms::Score::layoutSystemElements layout.cpp 3609 0x89ac5c
8 Ms::Score::collectSystem layout.cpp 3434 0x899509
9 Ms::LayoutContext::collectPage layout.cpp 3916 0x89ca3f
10 Ms::LayoutContext::layout layout.cpp 4212 0x89e604
11 Ms::Score::doLayoutRange layout.cpp 4198 0x89e4f2
12 Ms::Score::update cmd.cpp 220 0x9a32bd
13 Ms::readScore file.cpp 2333 0x62f2c6
14 Ms::MuseScore::readScore file.cpp 341 0x61cb3a
15 Ms::MuseScore::openScore file.cpp 319 0x61c9fa
16 Ms::MuseScore::loadFiles file.cpp 299 0x61c638
17 Ms::MuseScore::cmd musescore.cpp 5788 0x4d2e8c
18 Ms::MuseScore::cmd musescore.cpp 5609 0x4d1f76
19 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 854 0x76a7c3
20 QMetaObject::activate(QObject *, int, int, void * *) 0x68a929ea
...

Something about a tie going nowhere?

Maybe, via some hack I prevented the crash, now it reports corruption:

Measure 64, Staff 2 incomplete. Expected: 4/4; Found: 9/8
Measure 65, Staff 2 incomplete. Expected: 4/4; Found: 9/8

Fixing that and the score loads again in 3.0
Check those 2 measures, whether my rewrite is what you really wanted, before the fix they looked like
measure64.png
and
measure65.png
clearly an 8th note too much in each

Attachment Size
forest_voge1.mscz 117.03 KB

Debug output:

Debug: Init midi driver failed (...\MuseScore\mscore\pa.cpp:147, virtual bool Ms::Portaudio::init(bool))
Debug: Measure::read: encountered <endTuplet/> when no tuplet was started (C...\MuseScore\libmscore\measure.cpp:2295, void Ms::Measure::readVoice(Ms::XmlReader&, int, bool))
Debug: overfilled measure 120960, 2160 > 1920, track 4 (...\MuseScore\libmscore\check.cpp:392, void Ms::Measure::checkMeasure(int))
Debug: Measure::read: encountered <endTuplet/> when no tuplet was started (...\MuseScore\libmscore\measure.cpp:2295, void Ms::Measure::readVoice(Ms::XmlReader&, int, bool))
Debug: overfilled measure 122880, 2160 > 1920, track 4 (...\MuseScore\libmscore\check.cpp:392, void Ms::Measure::checkMeasure(int))
Warning: Element::readProperties: linked elements have different types: Tuplet, Chord. Input file corrupted? (C...\MuseScore\libmscore\element.cpp:601, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Tuplet at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link ChordLine at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Tie at staff 2 (C...MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: linked elements have different types: Tuplet, Chord. Input file corrupted? (...\MuseScore\libmscore\element.cpp:601, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Tuplet at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Chord at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link Note at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: linked elements have different types: ChordLine, Chord. Input file corrupted? (...\MuseScore\libmscore\element.cpp:601, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link ChordLine at staff 2 (...\MuseScore\libmscore\element.cpp:604, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Debug: Reconnecting broken connectors (2 nodes) (...\MuseScore\libmscore\xmlreader.cpp:647, void Ms::XmlReader::reconnectBrokenConnectors())
Debug: reconnected 1 broken connectors (...\MuseScore\libmscore\xmlreader.cpp:679, void Ms::XmlReader::reconnectBrokenConnectors())
Debug: remove keysig c at tick 0 (...\MuseScore\libmscore\measure.cpp:2212, void Ms::Measure::readVoice(Ms::XmlReader&, int, bool))
Debug: 0x2c58fe80 0-280320 Master systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: No system: measure is 0 has 0 count 0 (...\MuseScore\libmscore\tie.cpp:452, virtual void Ms::Tie::slurPos(Ms::SlurPos*))
Debug: 0x49680080 0-280320 Part systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: 0x49959f30 0-280320 Part systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: 0x49b415e0 0-280320 Part systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: 0x49d1cc90 0-280320 Part systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: 0x49dde340 0-280320 Part systems 0 (...\MuseScore\libmscore\layout.cpp:4074, void Ms::Score::doLayoutRange(int, int))
Debug: "Measure 64, Staff  2 incomplete. Expected: 4/4; Found: 9/8" (...\MuseScore\libmscore\check.cpp:201, bool Ms::Score::sanityCheck(const QString&))
Debug: "Measure 65, Staff  2 incomplete. Expected: 4/4; Found: 9/8" (...\MuseScore\libmscore\check.cpp:201, bool Ms::Score::sanityCheck(const QString&))
Priority P0 - Critical

Most of these messages relate to staff 2. Those for track 4 do too (track 0-3 being staff 1's voices), and it does seem to relate to tuplets.

Here's the hack I used to prevent the crash:

Measure* System::lastMeasure() const
      {
      if (!this) return 0; // added this line
      auto i = std::find_if(ml.rbegin(), ml.rend(), [](MeasureBase* mb){return mb->isMeasure();});
      return i != ml.rend() ? toMeasure(*i) : 0;
      }

I'd rather not see that hack in production ;-)

Possible. If that corruption can cause a crash even in a version that has the corruption fixed, i.e. if the fix only prevents the corruption to happen, but not the crash it gets on reading sich a corrupt score

Status active fixed

There is no crash in MuseScore 3.0.2. The score is corrupted in measures 64, 65, but ignoring the warning opens the score successfully.

Measure 64, staff 2 incomplete. Expected: 4/4; Found: 9/8
Measure 65, staff 2 incomplete. Expected: 4/4; Found: 9/8