Will not willingly upload MusicXML and MXL files

• May 9, 2021 - 05:12
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
duplicate
Regression
No
Workaround
No
Project

Download attached file and upload to Musescore 3.6, says it is corrupted or makes appliaction come to complete halt.

Attachment Size
Inkwell Isle - World One.musicxml 1.64 MB

Comments

The software that generated this .musicxml is apparently called "Flat", the source is https://flat.io/score/5ea059b9d902a04ad64ee6f3-inkwell-isle-world-one

The score is indeed very corrupt, it has 12 instruments, 10 of which are entirely empty, no time signature, no key signature, no rests (!), nothing.
From the remaining 2 instruments the 2nd is partly corrupt, no rests.

I guess that is due to the fact that this file is just a single line of 1721823 characters length, no further formatting at all. It seems at a certain point (2nd staff, measure 29) MuseScore stops reading it.

MuseScore loads it though, no hang or 'complete halt'

I guess so, yes. An entire score in just a single line is not going to work in any application that tries to read the file line by line and has a reasonable limit for a line length.
Report this problem to flat.

The attached file loads OK for me in 3.x, all versions of (desktop) MuseScore I tried (3.4.2, 3.5.1 and 3.6.2) fail. A debug build reports ASSERT: "_e.isEndElement() && _e.name() == "notations"" in file .../MuseScore/importexport/musicxml/importmxmlpass2.cpp, line 6188.

This is the MusicXML parser getting out of sync due to missing whitespace. I couldn't quickly find the issue number, but I do remember fixing it. Apparently the fix hasn't made it into a 3.6.x release yet.

Running the MusicXML file through an XML formatter fixes the issue, see attachment.

Perhaps I mixed up two issues, as they are related.
#315904: [MusicXML import] incomplete import from ScoreScan XML file
#317098: [MusicXML import] check code for white space issues

317098 is a larger problem, as the same issue is present at multiple locations in the importer, while 315904 is one specific instance.

Using my debug builds, 3.6.2 aborts on the Inkwell file (which would result in an incomplete and corrupt import using a production build) but 3.x imports that file without problems. The fix thus has been merged after 3.6.2.

The fix for #319210: MusicXML import detect corrupted file when the file is minified fixed the crash here, and indeed got merged after 3.6.2 got released. The one for #315904: [MusicXML import] incomplete import from ScoreScan XML file is in 3.6.2, but doesn't help here.

That score indeed does have <ornaments><inverted-mordent/></ornaments>, an empty (inverted) mordent tag, exactly the thing the fix for #319210: MusicXML import detect corrupted file when the file is minified fixed