MuseScore takes very long on opening some 2.X scores
Reported version
3.x-dev
Type
Functional
Frequency
Few
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
1) Open a score from https://musescore.com/openscore/scores/4861738 (can't attach it here since it exceeds the limit of 4MB)
Result: MuseScore hangs.
According to debugger it hangs somewhere around this line, possibly in the surrounding loop.
Tested on current master, 3.4.2 version opens this file just fine.
OS: Debian GNU/Linux 10 (buster), Arch.: x86_64, MuseScore version (64-bit): 3.5.0, revision: a5c92e2
Fix version
3.5.0
Comments
Cannot reproduce on 3.4.2.
Windows 10 MuseScore 3.4.2 (64 bit) revision: 148e43f
Score
https://musescore.com/openscore/scores/4861738
stems from MuseScore 2.1.0. I can't reproduce the hang either though, in 3.4.2, but indeed can in current master. And @dmitrio95 didn't claim otherwise ;-)
Actually, it does not hang. If you let it run sufficiently long, then the score is (finally) loaded.
The problem got introduced with my PR in commit 78d9a2978c72e : the problem is that, for 2.x import, each time a style text should be read, the whole xml file up to the point where the text xml tag appears is read (again). For very long files full of texts (as the example), this requires a (very) long time.
I am trying to see if it is possible to read the style in a different way (without reintroducing the bug which that PR was solving).
So introduced with the fix for #285434: Certain 2.x frame texts imported with no style, resulting in wrong size etc.
See https://github.com/musescore/MuseScore/pull/5969
Fixed in branch 3.x, commit dd9d773896
fix #303983 : MuseScore takes very long on opening some 2.x scores; without breaking #285434
Fixed in branch 3.x, commit d51a5057ee
_Merge pull request #5969 from AntonioBL/readtextstyle2
fix #303983 : MuseScore takes very long on opening some 2.x scores; w…_
Fixed in branch master, commit ea3bb89dfe
_Merge pull request #5969 from AntonioBL/readtextstyle2
fix #303983 : MuseScore takes very long on opening some 2.x scores; w…_
Automatically closed -- issue fixed for 2 weeks with no activity.