Crash on ending score playback

• Feb 26, 2019 - 19:28
Reported version
3.0
Type
Functional
Frequency
Many
Severity
S2 - Critical
Reproducibility
Randomly
Status
active
Regression
Yes
Workaround
No
Project

3.0, latest master, Ubuntu 18.04 LTS, ALSA. Crash ref: EDITOR-S

Reproduce:

open attached score. Play from anywhere, wait for playback to complete.

Result: crash

The stack trace is:

MuseScore3.exe 0x1407bff4e Ms::RepeatList::tick2utick(int) (c:\musescore\libmscore\repeatlist.cpp:224)
1 MuseScore3.exe 0x14068f91b Ms::Score::lastMeasure() (c:\musescore\libmscore\score.cpp:1681)
2 MuseScore3.exe 0x1402e8bff Ms::Seq::process(unsigned int,float *) (c:\musescore\mscore\seq.cpp:775)


Comments

I don't know how to fix this, mainly since I can't reproduce it. But I think it would be fixed by updating the RepeatList to use fractions instead of ticks. At the moment, we're converting from fractions to ticks and then doing some arithmetic with that. This leads to inconsistencies appearing, such as us trying to find things at the last tick + 1, which doesn't exist.