BUG: Hanging on XML Import

Dorico hangs whenever I try to import MusicXML from Logic Pro X.

Seems like Logic Pro doesn’t export MusicXML properly but unlike the normal MusicXML errors that Dorico usually displays following import, Dorico just hangs during import. I traced the problem back to the following XML code:

            
<note>
	<pitch>
		<step>G</step>
		<octave>5</octave>
	</pitch>
	<duration>10</duration>
	<voice>1</voice>
	<type>eighth</type>
	<stem>down</stem>
	<staff>1</staff>
	<beam number="1">end</beam>
	<notations>
	<slur number="0" type="stop"/>
	<articulations>
		<staccato/>
	</articulations>
	</notations>
</note>

The issue is . If I manually change it to as per MusicXML standards, Dorico no longer hangs.

Please add this to the list of known issues.

This is a bug in Logic’s MusicXML export. I will let the good people at Apple know about it: the number attribute must have a value between 1 and 6; a value of 0 is invalid.

Thanks Daniel. But just to compare, Finale doesn’t crash as a result even though it’s Logic’s fault. It would be nice if Dorico could just ignore an error instead of crashing.

Yes, I can import my MusicXMLs made with Logic to Finale, but not to Dorico.

MusicXML import in Finale is probably the most complete and resilient importer of the format that exists, and that’s not surprising, since it was written by the originator of the format who has a vested interest in going the extra mile (or ten) to recover from errors in MusicXML files exported by other programs. We certainly intend to try to improve Dorico’s resilience over time, but we have a lot of other stuff to work on, so importing MusicXML files that are simply invalid as far as the schema goes is not something that we can prioritise right now.

Makes sense. Keep up the good work guys.

I agree with the first part of the answer, but I would expect an “Invalid xml file format” error message or similar instead “hanging”. A good parser do not crash but give a senseful errormessage and stays alive :slight_smile:

The parser will definitely be showing a validation error, and we do normally manage to stick up a message box with said error in it. I’m not sure why that’s not happening in this particular case.

Thanks for making clear, Daniel. I did not want to be rude. I am sure your Team will give ist best.

Wait but I’m actually getting the same issue on Dorico Pro 2, when importing musicXML from Cubase 9.5. It just hangs infinitely, after a while the mac just gets super hot, but it never finishes the import. Any suggestions anyone? please? Thank you.

Dear TweakGeek,
If you can, try different routes. For instance, if you have Sibelius or Finale, try importing the XML in there and export it via Dolet (free XML exporter that goes along very well with Dorico). It adds an extra step, but I’m confident it will soon be useless. In the meantime, if it works, it’s some time earned.

TweakGeek, we’ve seen a couple of cases in Cubase where extra notations like hairpins get exported to MusicXML with effectively infinite durations, which cause Dorico to try and create enough bars to accommodate the absurdly-long hairpin. If you can attach your MusicXML file here we should be able to find the problem and fix the MusicXML file so that it will import successfully.

Actually the issue got fixed after the 2.1 update, I do get a warning sign that says “the file didn’t pass the validation”, but it still imports it. Daniel may be partly right, I am using some tremolo articulations which are simply not showing in the Dorico score, so a mis-translation of the articulations in Cubase may be the issue, I use expression maps in Cubase all the time. Not sure how to upload a file here, but please let me know if you still want to see it. Thank you and sorry for the late reply, I’m relatively new to the forums and haven’t activated the subscriptions yet.

By all means zip up the MusicXML file so that it’s in a zip archive and then attach it here, and we’ll take a look. If you could let us know the staves and bars in which you’re expecting to see things that are not showing up in Dorico, that would help us to figure out where the problem lies more quickly.

So I double checked what I said earlier about the Music XML importing issue being solved in version 2.1, and it’s not the case. I tried importing it coming straight from Cubase and once again the file was hanging infinitely on import, up until a point where the computer gets super hot and starts venting like crazy, if you force quit it, Dorico will show a message like “the system ran out of resources” or something like that.

I’m on a retina Macbook Pro mid 2012 with 16 GB of ram, and a 2.6 GHz Intel Core i7, 512GB SSD.
Music XML exported from Cubase 9.5.30
Dorico Pro 2.1

I’m unable to import this file straight into Dorico, however I am able to import it to Sibelius, and then re-export it (untouched) which Dorico will then accept. Sibelius won’t see Marcatos on this particular file (Dorico won’t either), however other articulations, including trills and tremolos, and pretty much whatever that can be seen in Sibelius, seem to translate just fine from Sibelius to Dorico.

Now I have been able to import some less busy files straight from Cubase to Dorico (with Dorico showing the warning sign that the file “didn’t pass the validation”, I can upload these upon request as well), however Dorico will not show Marcatos, Tremolos, Trills (neither the prall symbol nor the “tr”) let alone custom articulations. It’s only able to see Staccatos and Accents. On some occasions, Dorico will show pizzicatos, but will write them as text, which apear on top of the system (not under, as it is the rule) and it will not trigger the articulations in HSO.

ARTICULATIONS IN SCORE APPEAR AS FOLLOWS:

STRINGS - MARCATO:

Bar 9, 10, 41, 44, 46, 48, 50, 61 - 67, 77 - 84, 95 - 101, 108, 109, 191 on all Strings

Bar 18 on Viola

FOPICRE (Custom articulation)

9, 10, 41 on all strings


BRASS - MARCATO:

Bars 9, 17, 18, 43, 44, 48, 49, 61, 62, 65, 66, 77, 78, 80, 81, 84, 85, 109, 150, 153, 155, 157, 158, 170 on Trumpet

Bars 43 - 45, 65, 66 on Horns

Bars 43 - 45 on Trombone


BRASS - TREMOLO:

118, 139, 166, 175 on brass

108, 183 on Trumpet

108 on Horn

108, 183 on Trombone


WOODWINDS - TREMOLO:

184 on flute


WOODWINDS - TRILL:

Bar 77, 81, 84, 94, 98, 101, 119 on Flute

67, 114, 182 and 184 on Clarinet



I MAY HAVE MISSED SOME, but this should be enough for now.

That’s it for now. Thank you for replying and if you need me to upload anything else just let me know.
Archive.zip (1.62 MB)

Sorry to take such an extraordinarily long time to reply to this post.

The hang is caused by Cubase exporting very short hairpins with an overflowed offset value, which ends up as a very, very large positive number; Dorico dutifully then tries to place the direction (in your MusicXML file’s case, a hairpin) thousands of bars into the future. We will try to guard against these kinds of overflowing values and ignore the offsets when they get very large.

Trills and staccatos seem to import OK for me, but Cubase does not export tremolos correctly, so Dorico can’t import them, and it doesn’t appear to export marcato at all. I’ll take this up with the relevant people in the Cubase team for possible future improvement.