Crash on loading a possibly corrupted 2.0 file
- take the score from https://musescore.org/en/node/138791#comment-588771
- open it in a self-built (i.e. in DEBUG mode) ea88600
After a bunch of debug messages, some of which point at a corrupted files (see #139026: Corruptions in (linked) parts get detected, but only reported in the debug output, not in a dialog box like for corrupt scores) MuseScore crashes, stack trace:
1 Ms::Measure::createEndBarLines measure.cpp 3420 0x7db336
2 Ms::Score::collectSystem layout.cpp 2959 0x895e31
3 Ms::Score::collectPage layout.cpp 3424 0x898661
4 Ms::Score::doLayout layout.cpp 3549 0x8991cc
5 Ms::Score::update cmd.cpp 199 0x7a4cf3
6 Ms::readScore file.cpp 2133 0x5a779a
7 Ms::MuseScore::readScore file.cpp 328 0x597c6e
8 Ms::MuseScore::openScore file.cpp 309 0x597b3a
9 Ms::MuseScore::loadFiles file.cpp 290 0x5977fc
10 Ms::MuseScore::cmd musescore.cpp 4641 0x49e9a8
11 Ms::MuseScore::cmd musescore.cpp 4498 0x49e052
12 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 830 0x69b3a8
13 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
14 ZN12QActionGroup7hoveredEP7QAction 0x1c1d5295
15 ?? 0x221a1ad0
16 ZN7QAction8activateENS_11ActionEventE 0x1c1d4248
17 ?? 0x28c8f8
18 ?? 0x909001f7
19 ?? 0x6a2025ff
20 ?? 0x909001f7
...
Comments
The same file crashes in 2.0.3 when deleting and recreating all parts, whether it would in master can't get tested without this issue here being fixed first
Removing the parts of that score in 2.0.2 works, loading that fixed file in master then doesn't crash anymore
Jojo, what are the further steps for this issue? The MuseScore Master version crashes on opening file, MuseScore 2.2.1 opens the file without crash.
debug and fix the crash for master ;-)
This file is not opened. Nothing happens, so not critical but still weird.
That file (now attached here) still crashes in master (self build 32bit MinGW
stack trace:
1 Ms::Segment::stretch segment.h 185 0xe61594
2 Ms::Measure::stretchMeasure measure.cpp 3576 0x819ac4
3 Ms::Score::collectSystem layout.cpp 3195 0x7f7e7f
4 Ms::LayoutContext::collectPage layout.cpp 3609 0x7fac9d
5 Ms::LayoutContext::layout layout.cpp 3929 0x7fc854
6 Ms::Score::doLayoutRange layout.cpp 3902 0x7fc5bd
7 Ms::Score::update cmd.cpp 221 0x8e2ea5
8 Ms::readScore file.cpp 2239 0x5e094a
9 Ms::MuseScore::readScore file.cpp 331 0x5cf736
10 Ms::MuseScore::openScore file.cpp 312 0x5cf610
11 Ms::MuseScore::loadFiles file.cpp 293 0x5cf2f1
12 Ms::MuseScore::cmd musescore.cpp 5318 0x4ba04f
13 Ms::MuseScore::cmd musescore.cpp 5152 0x4b94d6
14 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 750 0x6ecde0
15 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68c7b9c2
16 ZN12QActionGroup7hoveredEP7QAction 0x228b4d75
I'm testing only 64-bit windows build. We won't ship official mingw32 builds to users.
Crashes in MSVC 64bit too, at the same spot. I'm not yet familiar enough with MSCV to debug or even gather a stack trace though.
Issue seems to be the 'endless'
for
loop, withsprings
being empty but still being executed/dereferenced at least once-_- I'll recheck
I may have a fix ready for the crash... no idea whether the idea is sensible though, see https://github.com/musescore/MuseScore/pull/3940
In reply to I may have a fix ready for… by Jojo-Schmitz
Again, there is no crash on downloaded pre-3.0alpha release build: https://ftp.osuosl.org/pub/musescore-nightlies/windows/MuseScore-2018-0….
It is seemed to be a debug specific issue.
Does the file open?
Whatever, the code is definitely bogus at that spot
In reply to Does the file open? by Jojo-Schmitz
No, there is a glitch and nothing happens. I'm sure it is not crashed by accidence :)
the code does not consider an empty
std::multimap
but instead accesses the first element, whether that exists or not. If it does not we see a crashYou need to use File/Open, not drag and drop the file into MuseScore, the latter indeed does nothing, no crash and no open file
Fixed in branch master, commit 5604bfc390
Fix #139021: Crash on loading a possibly corrupted 2.0 file
Fixed in branch master, commit fb6ce9d140
Merge pull request #3940 from Jojo-Schmitz/springs
Fix #139021: Crash on loading a possibly corrupted 2.0 file
Automatically closed -- issue fixed for 2 weeks with no activity.