XML load issue with direction-type

• Aug 3, 2016 - 14:11
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

Not entirely sure how, but xml pass 2 has assert fail at the end of ::directionType as it seems ::metronome loads the end tag into _e already so it gets skipped over.

Putting

if (_e.name()=="direction-type") break;

at the end of the directionType loop fixes the issue for the current file, but it feels like patching the symptoms rather than the actual problem


Comments

Tags View Changes

Trying to open that xml in 2.2.1 (as well as current master, 47dd401)g ives:

Fatal error: line 69 column 27 Element dotted is not defined in this scope.

When ignoring that 2.2.1 gives:
Measure 2 StafF 1 incomplete. Expected: 6/8; Found: 0/1
...
Measure 25 Staff 1 incomplete. Expected: 6/8; Found: 0/1

When ignoring that too it loads without a crash, but with entirely empty measures 2-25 and crashes when clicking into the score

master instead crashes right after ignoring the first message with:
Fatal: ASSERT: "_e.isEndElement() && _e.name() == "direction-type"" in file ...\MuseScore\mscore\importmxmlpass2.cpp, line 2594 (...\MuseScore\mscore\importmxmlpass2.cpp:2594, )

Looking into the xml shows that it has been created with NoteFlight version 0.3.2, and is MusicXML 2.0. The 'dotted' it complains about is the firs one in this:

                 <direction-type>
                  <metronome>
                    <beat-unit>quarter</beat-unit>
                    <per-minute>112</per-minute>
                  <dotted/></metronome>
                </direction-type>
                <sound tempo="112"/>
              </direction><direction placement="above">
                <direction-type>
                  <metronome>
                    <beat-unit>quarter</beat-unit>
                    <per-minute>112</per-minute>
                  <dotted/></metronome>
                </direction-type>
                <sound tempo="112"/>
 

I wonder whether that repetition of the metronome is causing the crash?

The correct code for dotted would be <beat-unit-dot/> BTW

Status (old) active closed
Status active closed
Tags View Changes

Fixing that wrong notation of a dotted quarter metronome and MuseScore imports it cleanly and without crashes, so I'd rather close this issue as not being MuseScore's problem, but a bug in NoteFlight, esp. as MuseScore requires to ignore that XML error to try loading that file.

Attached the xml file manually fixed, and the musicxml file exported after successful import of the xml file.

Attachment Size
segf1_0.xml 22.48 KB
segf1_0.musicxml 36.58 KB