Cut a measure with triplets after inserting a new measure causes corruption/crash

• Feb 6, 2017 - 08:35
Reported version
S2 - Critical

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


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:
2 août 2014.jpg

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?…

For fix: #29806: insert measure in front of key sig creates measure with wrong key sig; clefs too

Or, less likely (?), the previous commit:…

For fix: #29796: Crash on deleting all notes from part with mmrests; corruption on undo when doing same in score