Crash on changing a property of bracket in a part in Inspector
Steps to reproduce:
1. Create a new score.
2. Add some bracket to a staff.
3. Generate parts (File→Parts→New All→OK).
So you obtain something like this score: test.mscz.
4. Switch to a part (Piano in the given file).
5. Select the bracket.
6. In Inspector change the bracket's column two times. Note that after the first change bracket will lose selection, this may be related to the issue.
Result: crash.
Tested on:
OS: Debian GNU/Linux 9 (stretch), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: b3feb3a
Comments
All brackets are deleted and recreated during Score::doLayoutRange(). Selected brackets are deselected before they are deleted. I had added some code a little while ago that attempted to remember which brackets had been selected, so that they could be selected again after being recreated. Unfortunately, this code is not working as intended, and it is what leads to the crash. Results are better all around if the code is removed. See https://github.com/musescore/MuseScore/pull/4033.
Fixed in branch master, commit c47ecd2a33
fix #277030: Crash on changing a property of bracket in a part in Inspector
Fixed in branch master, commit 4e0c30994f
Merge pull request #4033 from mattmcclinch/277030-selected-brackets
fix #277030: Crash on changing a property of bracket in a part in Inspector
Automatically closed -- issue fixed for 2 weeks with no activity.
Issue came back, see #280347: changing a (staff/part/system) bracket's column (via Inspector) causes crash
Except: no need to create parts