XML load issue with direction-type
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
Fails an assertion -> results in segfault -> critical?
Yes.
Have a sample file that shows the problem?
I thought I attached it but apparently I forgot. It's here now:)
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:
I wonder whether that repetition of the metronome is causing the crash?
The correct code for dotted would be
<beat-unit-dot/>
BTWFixing 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.