MIDI import on certain MIDIs crash MuseScore
S2 - Critical
Importing the MIDI attached crashes the program. I'm not sure what exactly does it.
1. Click Open
2. Open the attached file
Imports the file.
The application has requested to terminate in an unusual way.
Which version of MuseScore, what OS?
During my first investigation, I found that the tick value calculated from the ReducedFraction via ticks() function returns a negative value due to the int overflow.
_numerator = 1 118 639
_denominator = 1 920
fraction.ticks() = (_numerator * MScore::division * 4 + (_denominator/2)) / _denominator;
MScore::division = 480,
so 1 118 639 * 480 * 4 is already 2 147 786 880,
that is greater than the 32 bit signed int limit: 2 147 483 648.
Debugger shows the answer: ticks() = -1 118 322
TimeSigMap::tickValues() calls abort() when a time moment was not found (because tick value is negative).
Yesterday's nightly (when I tested it) on Windows 7.
Fixed in 2a5e270050
Automatically closed -- issue fixed for 2 weeks with no activity.