[MusicXML import] crash when importing file with duplicate voice containing tuplet with rest

• Nov 21, 2020 - 09:58
Reported version
3.5
Type
Functional
Frequency
Once
Severity
S1 - Blocker
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Issue reported in https://musescore.org/en/node/313123. The file attached there contains two identical copies of voice 1, with measure 19 having a tuplet starting with a rest. MuseScore's MusicXML importer apparently ignores the duplication of every note and rest in voice 1, and fails to create the second copy of each rest. In MuseScore, a ChordRest can either be a single rest or a chord where the same note may be present multiple times. This seems to corrupt the importer's tuplet administration, resulting in a null pointer exception caused by trying to add a note to a non-existing tuplet.

Severity set to block, IMHO priority should be medium, as I consider the likelihood of finding the combination of duplicate voices and tuplets with rests low. Nevertheless, if I can quickly provide a fix, I will.

Isolated the problem in the attached small test file.

Relates to #270643: [EPIC] MusicXML import/export issues

Attachment Size
test_313123_nok2.xml 4.96 KB