Crash on loading a possibly corrupted 2.0 file

• Oct 27, 2016 - 09:01
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project
  1. take the score from https://musescore.org/en/node/138791#comment-588771
  2. 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

Severity S4 - Minor S2 - Critical

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

Attachment Size
Please.mscz 316.08 KB

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, with springs being empty but still being executed/dereferenced at least once

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 crash
You need to use File/Open, not drag and drop the file into MuseScore, the latter indeed does nothing, no crash and no open file