Crash when adjusting a system bracket loaded from a template

• Jul 3, 2018 - 05:11
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

To reproduce:
1. Create a new score using the Grand Staff template.
2. Select any system bracket/brace.
3. Use the inspector to adjust the column property of the selected bracket.
At this point, MuseScore will crash.

While I was working on the fix for #230311: Inability to delete one or more brackets, I realized that it was not safe to push BracketItem objects to the undo stack, and that they should instead be obtained from their staff and column properties. It is in trying to obtain the bracket item in the manner that is where the crash occurs.

It turns out that this bracket item’s staff property is not set to the Staff to which it belongs. The reason for this can be traced back to Staff::init(Staff*), where the bracket item is copied from the original staff, but its staff property is not set to the new Staff.


Comments