Crash when trying to edit a percussion part from a MusicXML file

• Apr 10, 2015 - 21:27
Type
Functional
Severity
S2 - Critical
Status
closed
Project

1. Open any of the attached files (the .mxl file was exported by Sibelius 7.1.3 and the .xml was exported by Dolet for Sibelius 6.4)
2. Try to edit some note of the percussion part
-- MuseScore will crash

Something curious: If you open the .xml file and check the "percussion set" on the mixer before trying to edit the percussion part MuseScore will not crash. But if you do the same with the .mxl file MuseScore will crash anyways (the "out of range" showing could make this difference?)

MuseScore 2.0 on Windows 7 (32 bit)

Attachment Size
Funk.mxl 33.6 KB
Funk.xml 1.42 MB

Comments

I get a crash just loading the mxl file in the current master - presumably an issue relating to the new "pull" parser? The crash is trying to add the fraction 0/0 to the time position of a harmony element here:

https://github.com/musescore/MuseScore/blob/master/mscore/importmxmlpas…

also

https://github.com/musescore/MuseScore/blob/master/mscore/importmxmlpas…

If I comment out the "+ offset" in both places, I can get it to load without a crash. I do then get a crash on editing the drum part. Looks like the drumset is not being set up properly? Right clicking the staff doesn't give me an "edit drumset" option.

I should mention, I don't know if the crash I see is the same that would have been seen in a build from before the pull parser was added, post 2.0. Were you using the official release or something else?

The crash I see is in trying to display the name of the note in the status bar. We are seeing this a a drum staff, but there is no drumset defined, and we are failing to notice that and trying to use the non-existent drumset to tell us the name of the drum note. So the actual crash is easy enough to fix; just make sure there is a drumset before trying to query it in Note::accessibleInfo(). But it seems the fact that there is no drum set defined is a more fundamental problem?

Am investigating. Using current trunk (commit 5b6d966):

Pull parser:
----------
Funk.mxl
Assertion failed on import: "val >= 0 && val <= 127" in file libmscore/note.cpp, line 274
Ms::Note::setPitch(), called from Ms::MusicXMLParserPass2::note()
Funk.xml
Floating point exception on import, after:
Info at line 6772 col 18: FretDiagram::readMusicXML string 1 fret 8
illegal duration '-129'
duration 0/0 valid 0

DOM parser:
-----------
Funk.mxl
Same assertion fails (probably shortly after reading line 25312)
Ms::Note::setPitch(), called from Ms::MusicXml::xmlNote()
Funk.xml
Imports but segfaults in Ms::Note::accessibleInfo() line 2476 (executing part()->instrument()->drumset()->name(pitch())) when clicking on a note in the percussion part

Seems there are at least three separate issues. Will try to fix the DOM parser first.

Note that pull parser issues were to be expected (too much new code to be bug-free, which is why it had to be merged after 2.0, at the start of a new development cycle).

Preventing the crash by checking for null pointers in Note::accessibleInfo() and Note::screenReaderInfo() is easy and seems harmless. Pull request #1941.

Root cause is indeed a staff of type percussion with no drum set defined. I am not quite sure how to handle that.