Articulations are duplicated on adding linked staves, crash is possible

• Dec 10, 2018 - 09:53
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

I.
1) Create a new score.
2) Add a note, put a fermata to this note.
3) Go to Instruments dialog, add a linked staff.
First result: the first staff now has two fermatas.

II.
1) Go to instruments dialog again (with this score or recreated from scratch with steps 1-2).
2) Add some more number of linked staves (say, 3 should be enough).
MuseScore crashes.


Comments

Status PR created fixed

Fixed in branch 3.x, commit e6253ec7da

_Fix #279773 - Articulations are duplicated on adding linked staves, crash is possible

When creating a linked staff, closeStaff() will create a new Fermata element
and add it using undoAddElement() which will create a clone on each staff but
this doesn't take an exiting Fermata into account. As a result a second Fermata
appears at the original staff.
This is solved by creating a linked clone from the original Fermata and copy this
clone to the linked staff.

This solves also the crash. The crash was caused by a corrupted returned
annotation in line 888 of Excerpt::cloneStaff()._

Status active fixed

Fixed in branch master, commit 7be400bc34

_Merge pull request #6093 from njvdberg/issue-279773-dublicated-articulations

Fix #279773 - Articulations are duplicated on adding linked staves, c…_

Fix version
3.5.0