Full measure rest in anacrusis and grace note causes crash

• Oct 13, 2012 - 17:23
S2 - Critical

The attached score created with MuseScore 1.2 crashes the current development version fdd8040eed

If the first staff, first full measure rest is replace by a quarter rest in MuseScore 1.2, the file is working.

It's easy to recreate the same score in MuseScore 1.2.

  1. Create a 4/4 scores with 2 measures and 2 instruments
  2. Change first measure actual duration to 1/4
  3. in the second staff enter a quarter rest in the first measure and 8 eights notes in the second measure
  4. Add a 16th grace note in front of the last 8th.
  5. Save in 1.2, open in fdd8040eed --> Crash
Attachment Size
GraceNoteTest.mscz 1.5 KB


Stacktrace extract :
#3 0x08664f37 in Segment::add (this=0xd4faa48, el=0xd4fdd08) at ~/MuseScore/libmscore/segment.cpp:489
#4 0x0862e5f9 in Measure::read (this=0xd4f3a40, de=..., staffIdx=1) at ~/MuseScore/libmscore/measure.cpp:1961
#5 0x086d3003 in Score::readStaff (this=0xd4ce580, de=...) at ~/MuseScore/libmscore/scorefile.cpp:222
#6 0x08705aa8 in Score::read114 (this=0xd4ce580, de=...) at ~/MuseScore/libmscore/read114.cpp:201

There's a deliberate abort() in the given code, because there are two symbols that overlay each other. I don't understand why this abort() is here since there should be a proper error treatment first.

Removing the deliberate abort does not affect the software, while it loads "properly" the score (see attachment).

Attachment Size
score_capture.png 82.97 KB

Consider the abort as a hard "debug" method in the development version. It crashes so there is a big problem. Loading the score in this state will probably bring more and more problems. So the root of the problem, two elements on the same tick same track needs to be solved. Removing the abort will just silent the actual bug.

I completely agree with the validity of that methodology. I was just wondering if the overlay bug was not just a legacy that we anyway couldn't get rid of. If so, displaying an appropriate error message while refusing to load the file seemed a better option to me. Is it what's intended in the release ?