[MusicXML import] Musescore crashes when loading .mxl file containing incomplete tuplet

• Jun 27, 2020 - 16:08
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S1 - Blocker
Reproducibility
Always
Status
fixed
Regression
No
Workaround
No
Project

I started Musescore, closed the start centre, and then opened the attached .mxl file (exported from Audiveris, latest build as of 27/06/2020). Musescore hangs, goes unresponsive, and then crashes. I don't get any error message or notification. When I restart Musescore, it asks me if I want to restore the session. If I click 'no', it starts as usual; if I click 'yes', it starts as if I clicked 'no'. (In other words, it does not then load the .mxl file.) It can open other .mxl files, so I think the issue is isolated to this particular .mxl file.

Attachment Size
6 Who Are You Sir.mxl 74.36 KB

Comments

I've noticed some measures with errors in the Audiveris file. Perhaps they are causing the crash? (Although I'm quite sure I've loaded .mxl files with red measures before...) The problem is, I can't figure out how to fix the measures in Audiveris.

For example, score page 3, measure 2 is red. But everything in the measure is correct, and the voices are assigned correctly. In the log, it says the measure is too long by 1/4. There's a half note and a half rest, and the time signature is 4/4. I tried deleting it all and entering it manually. The red goes away if I have only a half note or only a half note + quarter rest. As soon as I add the half rest, it turns red again.

On score page 5, second system, the first and last measures are red. When I show voices, the first measure doesn't recognise voice assignments for the last beat, and the third measure doesn't recognise voice assignments for the third and fourth beats. I haven't the faintest idea how to assign voices. I've tried deleting and manually entering the notes, but they still show up as green (while the other notes in the measure are either blue, teal or yellow).

Crash reproduces on current 3.5. Seems to be caused by a error in the input file, error message is "importmxmlpass2.cpp:Ms::addRest: cannot add rest at tick 107200 track 12: element already present".

Title Musescore crashes when loading .mxl file [MusicXML import] Musescore crashes when loading .mxl file containing incomplete tuplet
Status PR created active

As I am running development builds only, the console output may differ from regular builds.

Cause of the crash is incomplete error handling, which is triggered by an incomplete tuplet in the piano part in measure 56. Fix is available in pull request https://github.com/musescore/MuseScore/pull/6269, which I assume will still make it into 3.5.

Result of importing the file after implementing the fix is attached.

Also see #307272: [MusicXML import] possibly incorrect error handling when importing incomplete tuplet.

Relates to #270643: [EPIC] MusicXML import/export issues.

Attachment Size
6 Who Are You Sir.mscz 51.09 KB
Fix version
3.5.0