Multi-page scores yield invalid MusicXML
Reported version
3.x-dev
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
As far as I can tell, any score of more than one page yields an invalid MusicXML when exported. In particular, there is a validation error regarding the system-distance tag at the top of the second page (either that or the error is spurious; the score does actually load if you ignore it).
Simple steps to reproduce:
1) default empty score
2) add page break after measure 4
3) export to MusicXML
4) try to import
Result: "Fatal error: line 125 column 27 Element system-distance is not defined in this scope."
If you go to Edit / Preferences / Export and turn off "Export all layouts", there is no error. Any of the other settings seem to be good.
Fix version
3.5.0
Comments
Relates to #270643: [EPIC] MusicXML import/export issues
A quick investigation shows the code writing system-distance tags was changed twice recently, presumably one of these is the culprit:
https://github.com/musescore/MuseScore/pull/5775
https://github.com/musescore/MuseScore/pull/5471
There are two obvious errors in the export:
- elements top-system-distance and system-distance are in incorrect order
- element system-distance contains an incorrect value
Probably my mistake, am investigating. I consider this a showstopper for 3.5, as every MusicXML export including all layout information will be invalid.
Is it a regression vs 3.4.2?
Yes.
Cause is indeed https://github.com/musescore/MuseScore/pull/5775. I know how to fix this, will provide a PR within a few days.
@Leon Vinken I'm preparing Beta release... Any news regarding the fix?
FWIW, if a fix isn't forthcoming soon enough, I'd be fine with a temporary hack of simply ignoring the "Export all layouts" option (btw, that "s" isn't really appropriate here) and treating it for now as if the user specified "Export all system and page breaks" instead.
Pull request (for 3.x) created: https://github.com/musescore/MuseScore/pull/6175. @Marc, the "s" has also been removed :-).
Note that this also has to go into master. In case the recent code style changes prevent automatic merge I can provide a separate PR for master.
.
Fixed in branch 3.x, commit 1bf7d0b026
fix #306317: Multi-page scores yield invalid MusicXML
Fixed in branch 3.x, commit f0102104c3
_Merge pull request #6175 from lvinken/306317-incorrect-system-distance-3.x
fix #306317: Multi-page scores yield invalid MusicXML_
Fixed in branch 3.5beta, commit e25376faae
_Merge pull request #6175 from lvinken/306317-incorrect-system-distance-3.x
fix #306317: Multi-page scores yield invalid MusicXML_
Automatically closed -- issue fixed for 2 weeks with no activity.