[Musicxml import] crash if notations on rest

• May 6, 2015 - 20:18
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

I have a MusicXML file created from Sibelius 6 with the latest version of the MusicXML Dolet plugin. (I believe this is creating a MusicXML 3 file). I can open the file just fine in Finale 2012, but it crashes when I attempt to open in MusicXML 2.0.1 on MacOS X Mavericks (and I see there is not a newer nightly).

Attached are two files: the zipped MusicXML file (once uncompressed it's big, sorry) and the Problem Report generated by Mac OS X, if that helps.

Attachment Size
XML_inport_crashreport.txt 81.37 KB
popuri.xml.zip 49.85 KB

Comments

When loading into the current development build - which uses a different parser for MusicXML, so things may be different - the crash seems to happen on a "string" element for which there is no note.

When loading into the current development build - which uses a different parser for MusicXML, so things may be different - the crash seems to happen on a "string" element for which there is no note.

Info from gdb:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000000004c
Ms::Element::staff (this=0x0) at /Users/lvi/dev/MuseScore/libmscore/element.cpp:380
380 if (_track == -1 || score()->staves().isEmpty())
(gdb) bt
#0 Ms::Element::staff (this=0x0) at /Users/lvi/dev/MuseScore/libmscore/element.cpp:380
#1 0x0000000100497804 in Ms::MusicXml::xmlNotations (this=0x7fff5fbfce60, note=0x0, cr=0x11514ea50, trk=0, tick=119520, ticks=480, e=@0x7fff5fbfa460) at /Users/lvi/dev/MuseScore/mscore/importxml.cpp:5000
#2 0x000000010048435d in Ms::MusicXml::xmlNote (this=0x7fff5fbfce60, measure=0x1152401a0, staff=0, partId=@0x7fff5fbfb7b8, beam=@0x7fff5fbfb888, currentVoice=@0x7fff5fbfb800, e=@0x7fff5fbfb7b0, graceNotes=@0x7fff5fbfb7f8, alt=@0x7fff5fbfb8b0) at /Users/lvi/dev/MuseScore/mscore/importxml.cpp:5932
#3 0x00000001004779d1 in Ms::MusicXml::xmlMeasure (this=0x7fff5fbfce60, part=0x11514a940, e=@0x7fff5fbfc008, number=86, measureLen={_numerator = 2, _denominator = 4}, currKeySig=0x7fff5fbfc038) at /Users/lvi/dev/MuseScore/mscore/importxml.cpp:2519

MuseScore crashes with a segmentation fault on line 4805 of file popuri.xml, where a rest has a notations/technical/string element. This fails because in this case (as the current note is a rest) the variable "note" is 0. Not too difficult to fix, but note that in MusicXml::xmlNotations() every time variable "note" is used,it must be checked for 0. Same goes for the pull parser, which fails similarly.

Simpler file attached that illustrates the problem.

Attachment Size
rest_with_string.xml 1.84 KB