[MusicXML] <notations> tag causes infinite loop on load

• Nov 6, 2016 - 15:45
Reported version
2.1
Type
Functional
Severity
S3 - Major
Status
closed
Project
Tags

Steps to reproduce: just try opening the attached file.
Remove tag from line 402 and it will work.

Offending bit of code seems to be in
importxmlpass2.cpp in MusicXMLParserPass2::note

under:
// handle the postponed children of
while-loop, where commenting out the code for:
// skip to either start of next child or end of

seems to make things work again. I am reluctant to propose that as a fix here, because that code was probably put there for a good reason, so it likely needs to be reworked rather than removed, but I am not competent to do so.

Tagging major as it causes an infinite loop for completely well-formed xml imput.

Attachment Size
chromatic.xml 60.5 KB

Comments

I found an example of a file where that while was indeed neededattached as Strauss.xml - which also currently causes an infinite loop.

However, everything seems to work for both files if
do {} while()
is changed to
while() {}

Attachment Size
Strauss.xml 41.55 KB
Status (old) active fixed

Both files are not valid MusicXML, diatonic is supposed to be before chromatic. That being said, I can load the files with a development version of the next minor release. So the bug is probably fixed. Could be the same bug than #120156: Infinite loop with an XML ?