-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MusicXml parser is broken when comment follows empty node #24704
Comments
I'm happy to fix this, and I'd like to improve the error reporting too, as it always currently reports line number/column as 0 for most parsing errors. |
Same issue may be found when importing MusicXML files produced by Sibelius, see https://musescore.org/en/node/367552. Initially I suspected it was caused by the empty measures, but further investigation points towards the comment. Apparently introduced in MuseScore 4.4. Attached zip contains two MusicXML files, differing only in one comment line. One imports correctly, the other doesn't. Both files import OK into 4.3. |
Seems to be a Mu3 regression Even if Mu3 imports that only with major corruptions, but Mu4 does too, with or without the changes from the PR Edit: oh, sorry, a 4.3 regression as per @lvinken |
Happy to have a look at those cases too. |
Are you saying you have a music xml file that fails to import even with my fix? The bug I fixed has been there since May 2022 anyway. |
No, it does Import, but with major corruptions |
This issue is still in the "Done" folder of 4.4.3 project. |
I believe that's expected; the part that was supposed to go into 4.4.3 has indeed been ported to 4.4.3. The rest, being more of a 'nice to have', will go into 4.5 only, to reduce risk. @oktophonie Is that right? |
You mean parts of my commit were cherry-picked into the 4.4.3 branch? Nothing's in master... |
That one line in xmlstreamreader was cherry-picked via #24819. |
Issue type
Import/export issue
Description with steps to reproduce
<attributes></attributes><!--xml comment-->
somewhere in it.<!--xml comment-->
is imported.Supporting files, videos and screenshots
XMLFile1.zip
What is the latest version of MuseScore Studio where this issue is present?
4.4
Regression
I was unable to check
Operating system
Windows 11
Additional context
This is a musicxml file exported from Encore, and it does still have problems, however the main issue is that the XML parser doesn't handle the specific case of
<node></node><!--- comment -->
.This is due to code in XmlStreamReader.cpp:
That needs to also check for sibling->ToComment().
Checklist
The text was updated successfully, but these errors were encountered: