Crash opening version 2 score
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
Crash report received: https://sentry.musescore.org/share/issue/0135d99d1c49448f945e9a97575b7e…
This score crashes even in the initial 3.0 release so this doesn't seem to be a regression.
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.
4688086 is quite big, where there is that incomplete check?
In reply to 4688086 by Jojo-Schmitz
In file MuseScore\libmscore\read206.cpp, around line 3850.
Searching "sanity check for barLineSpan", the code disabled by macro.
I see, libmscore/read206.cpp, lines 3848-3896
Seems the place where you could starting having a play with ;-)