[MusicXML import] crash on empty credit-words
Reported version
3.x-dev
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
Self build (current)
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0, revision: 546fcee
Repro steps:
1. Import the attached XML
Expected behaviour: A new score should open
Actual behaviour: Nothing happens in the UI. Following debug string is traced:
str = Error at line 67 col 15: MusicXMLParserPass2::part cannot find part 'P1'
and then a null pointer exception is thrown in line 1571 of importmxmlpass2.cpp
Attachment | Size |
---|---|
MusicXML-import-parts.xml | 7.89 KB |
Fix version
3.5.0
Comments
Imports just fine for me, MuseScore 3.4.2, Windows 7
Oh, I see, you're using a development build
It indeed crashes in development builds
It crashes due to a failed assertion (in a Debug build):
Fatal: ASSERT: "_e.isEndElement() && _e.name() == "credit"" in file ...\mscore\importmxmlpass1.cpp, line 1177
Relates to #270643: [EPIC] MusicXML import/export issues
MusicXML got generated by "CapToMusic.py CapXML to MusicXML converter version 1.4"
And it generated an empty
credit-words
, which seems the culprit fot this crashas changing that to
and the crash won't happen, but import the xml cleanly
It may count as a workaround to edit the MusicXML file before import in MuseScore.
On
<credit>
<credit-words></credit-words>
/credit>
<part-list>
<part-group type="start" number="1">
..
QXmlStreamReader::skipCurrentElement() moves from credit to part-group.
But on
<credit>
<credit-words>abc</credit-words>
/credit>
<part-list>
<part-group type="start" number="1">
..
it moves to part-list
Trivial error, trivial fix. See pull request https://github.com/musescore/MuseScore/pull/5766
Relates to #270643: [EPIC] MusicXML import/export issues
Very good - thank you!
Can you tell me, why the final barline does not span to the second staff?
Barline spansrequires an element group-barline with value yes as child of part-group, but group-barline is not present. Note that even when adding it, MuseScore does not handle it, which may be a bug.
So it is MuseScore, not the import that makes the different span between the bar at the end of the first line and the final bar?
I will write a bug. Thank you!
Fixed in branch master, commit f0e1fccd23
fix #301672 - [MusicXML import] crash on empty credit-words
Fixed in branch master, commit 3baf61d106
_Merge pull request #5766 from lvinken/301672-empty-credit-words
fix #301672 - [MusicXML import] crash on empty credit-words_
That other bug now in #301719: Final barline does not span to the second line after MusicXML import
Automatically closed -- issue fixed for 2 weeks with no activity.