Musescore crashes on reading MSCX files with invalid measure length

• Jan 22, 2019 - 19:01
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

When I try to open a score that I got from a PDF conversion MuseScore just crashes, on every PC that I try to use.
I'm using Musescore 3.0.1 on Windows 10
I'm attaching the mscz file


Comments

Priority P0 - Critical

Confirmed. Looks like the file contains a bunch of completely empty measures - not even rests - so you weren't going to get much of value from the file anyhow, but we shouldn't crash, either.

Stack trace:
1 Ms::Fraction::operator+= fraction.cpp 117 0x9e0f21
2 Ms::TimeSigMap::normalize sig.cpp 263 0x9dd65a
3 Ms::TimeSigMap::add sig.cpp 220 0x9dd497
4 Ms::Measure::read measure.cpp 1927 0x8b5d32
5 Ms::Score::readStaff scorefile.cpp 346 0x9d2605
6 Ms::Score::read read301.cpp 45 0xa41198
7 Ms::MasterScore::read read301.cpp 273 0xa42a9c
8 Ms::MasterScore::read301 read301.cpp 325 0xa42dad
9 Ms::MasterScore::read1 scorefile.cpp 963 0x9d6302
10 Ms::MasterScore::loadCompressedMsc scorefile.cpp 823 0x9d55e7
11 Ms::MasterScore::loadMsc scorefile.cpp 875 0x9d59c7
12 Ms::MasterScore::loadMsc scorefile.cpp 866 0x9d58a3
13 Ms::readScore file.cpp 2244 0x62f2cd
14 Ms::MuseScore::readScore file.cpp 341 0x61d25e
15 Ms::MuseScore::openScore file.cpp 319 0x61d11e
16 Ms::MuseScore::loadFiles file.cpp 299 0x61cd95
17 Ms::MuseScore::cmd musescore.cpp 5787 0x4d39b2
18 Ms::MuseScore::cmd musescore.cpp 5608 0x4d2a9c
19 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 854 0x769e47
20 QMetaObject::activate(QObject *, int, int, void * *) 0x68a929ea
...

Frequency Many Once

That score still crashes in 3.3.4 and latest master (soon to be 3.4) with almost the same stack trace

1 Ms::TimeSigMap::normalize sig.cpp 264 0x9f792f
2 Ms::TimeSigMap::add sig.cpp 220 0x9f773f
3 Ms::Measure::read measure.cpp 1959 0x8cd4de
4 Ms::Score::readStaff scorefile.cpp 345 0x9ec24b
5 Ms::Score::read read301.cpp 45 0xa5b8e2
6 Ms::MasterScore::read read301.cpp 277 0xa5d0d3
7 Ms::MasterScore::read301 read301.cpp 329 0xa5d3cb
8 Ms::MasterScore::read1 scorefile.cpp 962 0x9efbe7
9 Ms::MasterScore::loadCompressedMsc scorefile.cpp 822 0x9eef1a
10 Ms::MasterScore::loadMsc scorefile.cpp 874 0x9ef275
11 Ms::MasterScore::loadMsc scorefile.cpp 865 0x9ef188
12 Ms::readScore file.cpp 2271 0x4cdf86
13 Ms::MuseScore::readScore file.cpp 350 0x4bca42
14 Ms::MuseScore::dropEvent musescore.cpp 2857 0x417e65
15 ZN7QWidget5eventEP6QEvent 0x281268ce
16 ?? 0x43b
17 ?? 0x28d388
18 ?? 0x36071978
19 ?? 0x2fff51b8

Fix version
3.5.0