MusicXML import of tuplets yields elements with zero duration, resulting in corruption/crash
Hello,
When importing an xml file (Time signature 2/4) having a tuplet of 3x16th, the time containing this (or those) tuplets is wrong :
If I try to delete the tuplet number (3 in my example) Musescore suppress also its duration, showing a mesure of 1,5 duration instead of 2. The mesure properties still show a 2/4 timing.
Nota : the export of this configuration from Musescore to xml is correct.
Kind Regards
GIT commit: f51dc11
Attachment | Size |
---|---|
Musescore bug2.jpg | 35.25 KB |
Page récréative testok.mscz | 4.02 KB |
Comments
exporting that mscz as xml, importing it, selecting the 1st 3 (tuplet number) and hitting delete, then trying to select the measure leads to a Crash
MuseScore 2.0.2 as well as latest development build, 5a8cf68, Windows 7 (Enterprise, 64bit)
Stack trace:
0 Ms::Segment::tick segment.cpp 757 0x796ec3
1 Ms::Selection::updateSelectedElements select.cpp 496 0x75a633
2 Ms::Score::selectRange score.cpp 3210 0x743acd
3 Ms::Score::select score.cpp 2997 0x742d23
4 Ms::Score::selectSingle score.cpp 3016 0x742da4
5 Ms::Score::select score.cpp 2995 0x742cf2
6 Ms::ScoreView::select scoreview.cpp 3551 0x414a31
7 Ms::SelectTransition::onTransition scoreview.cpp 472 0xafe963
8 ZN20QStateMachinePrivate24executeTransitionContentEP6QEventRK5QListIP19QAbstractTransitionE 0x68a916dc
9 ?? 0x19a90000
10 ??
I don't know what tuplets are supposed to look like in MusicXML, so I can't really say for sure if the issue is in the export or the import. But the root cause of the crash is quite apparent: after importing the file, the tuplets themselves (not the notes, but the actual Tuplet objects) all have duration 0/16, where they should have duration 2/16. I'm guessing maybe the export is OK and the import is just failing to set the duration of the tuplet element, but I don't really know.
Problem is in the import. Export is OK. It also reproduces with other MusicXML files containing tuples.
Does not reproduce for me anymore (OS X, commit 421f366 of Nov 1). Please report if this has disappeared or still happens on other platforms.
Still reproduces for me. Try the following:
1) load attached XML file
2) click the "3" on the triplet
3) press "Delete"
Result: the entire triplet is deleted and is not replaced by a rest as it should be, leaving the measure corrupt.
It happens also if the whole tuplet is range-selected (i.e. click on first note and shift+right arrow to select the whole tuplet) and then is cut or deleted.
Possible solution:
https://github.com/musescore/MuseScore/pull/2335
Fixed in branch master, commit bb97c5cbe3
fix #86636 : MusicXML import of tuplets yields elements with zero duration
Fixed in branch master, commit 88f837108f
Merge pull request #2335 from AntonioBL/tupletduration
fix #86636 : MusicXML import of tuplets yields elements with 0 duration
Fixed in branch 2.0.3, commit 910ecf5428
fix #86636 : MusicXML import of tuplets yields elements with zero duration
Automatically closed -- issue fixed for 2 weeks with no activity.