Staff type change in first measure causes a crash

• May 27, 2020 - 07:18
Reported version
3.x-dev
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.0.11614, revision: 1ee2fe3

I was trying various things with the S symbol (Staff type change). Fortuitously, while working with 3.4.2, I noticed that adding this symbol in the 1st measure caused a crash when trying to load the file with 3.5 Alpha, but also the current 3.X dev. and master.
This is a regression (this was already causing a crash in an earlier version and had been fixed a few months ago in memory - I can't find it now).

Steps:
1) Default score in version 3.4.2
2) Enter a few notes in first measure and add "S" symbol (Staff style change)
Test file at this step: Staff type.mscz
3) Save/Quit
4) Reload in version 3.5 Alpha/currrent3.x dev/current master

Result: crash

Note: of course, same crash by adding this symbol in a new score in current 3.X, then Save/Quit/Reload in same current 3.X


Comments

Status PR created fixed

Fixed in branch 3.x, commit 4ab3959ee0

_Fix #305962 - Staff type change in first measure causes a crash

This is essentially the same PR as PR #5318 which got get lost by PR #5745._

Fix version
3.5.0