Crash opening version 2 score

• Apr 12, 2019 - 15:27
Reported version
3.x-dev
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

This issue was created while sending a crash report. Issue number is attached to crash report.

Opening the attached file in version 3.1-beta results in crash.

Attachment Size
Septuplets_V2.mscz 21.65 KB

Comments

The problem is due to some corrupt data in Musescore 2 file.
In Musescore 2, the barline can span multiple staves. While in Musescore3, a barline can only span to the next stave.
So, when we are importing an old file with spanned barline into Musescore 3, it will break a long barline that crosses several staves into several barlines that cross only one stave;
Musescore 2 has some functions to limit the maximum spanned value, while in this file, the limitation and the staves' order is broken. The invalid spanned value causes an index out of range exception.
I can't reproduce the process to create that file, and Musescore 3 avoids the issue in future. Index checking should be an easy solution.
Then, I found an incomplete checking function four years ago.
commit ID 46880864199186f6cf4df74db2e802bab6213503
Should I just fix the bug with one-line code or finish the entire checking function? The checking function is meticulous, but it is hard to meet these conditions.