Cut a measure with triplets after inserting a new measure causes corruption/crash
Version 2.0.3, and currents 2.1 dev. and 3.0 dev.
1) "My First Score"
2) Enter a triplet first measure first beat -> Exit "N"
3) Select this first measure -> Add -> Measures -> Insert one measure
4) Cut (Ctrl +X) the measure containing the triplet
Result: corruption of the following measure (and of course, you receive a crash by clicking on it)
Eg: on this test file: Test file1.mscz
After cutting, the corruption is (expected: 4/4, found 1/8) and after Undo (expected: 4/4, found 0/1)
- There is several scenarios depending different triplets and so with different corruptions. Here a few test files (with always the same main steps: ie select the measure containing triplets -> insert a new measure -> cut the measure containing triplets.
- test file2.mscz
- file test3.mscz
- A last one (in a score I was testing with notes: all is messed after the corrupt measure): Untitled.mscz
- Nevertheless, it seems the necessary condition is that at least a triplet must be on the first beat.
On these two files, there is no triplet on the first beat, and it works as expected.
- file test5.mscz
- file test6.mscz
Comments
Interesting: no issue on beginning July 2014 but problem in end March 2015 (2.0)
Worths further investigation.
So, after investigation: I can say this issue appears on August 18, 2014.
- This nightly works as expected: 5be74db
- Not this one (images below produced with it): f4a34a2
After insert a measure and cut:
After a first checking, nothing obvious immediatly (except an oblivion, no commits about triplets eg). Nevertheless, I see something about "insert measure".
So, maybe here? https://github.com/musescore/MuseScore/commit/eb25fadc864c30fdb8a76cf84…
For fix: #29806: insert measure in front of key sig creates measure with wrong key sig; clefs too
Or, less likely (?), the previous commit: https://github.com/musescore/MuseScore/commit/2f8b9d12f2a77a86634c9fa72…
For fix: #29796: Crash on deleting all notes from part with mmrests; corruption on undo when doing same in score
It's the less likely...
If I do comment the line uncommented by https://github.com/musescore/MuseScore/commit/2f8b9d12f2a77a86634c9fa72… It fixes this bug. It does crash for #29796: Crash on deleting all notes from part with mmrests; corruption on undo when doing same in score though. So I will try to fix both but it would be great if someone could hammer on these cases and try to break it.
Fixed in branch 2.1, commit 82110fcaf3
fix #167416: cut a measure with tuplet causes crash. Trying to not reopen # #29796
Fixed in branch master, commit c2ef50f646
fix #167416: cut a measure with tuplet causes crash. Trying to not reopen # #29796
Automatically closed -- issue fixed for 2 weeks with no activity.