Crash when playing with lead-in in a score with repeats
- Open this file
- mark first note in bar 38.
- View > Play Panel > Press "Play count-in at playback start"
- Then "play"
MuseScore crashes.
A quick investigation shows that it's due to the repeats. A workaround is to deactivate the repeats in the toolbar next to the play button.
Comments
The problem arises in mscore/seq.cpp, at lines 617-618:
https://github.com/musescore/MuseScore/blob/master/mscore/seq.cpp#L617
{syntaxhighlighter brush:c++;first-line:617;} int plPos = playPos->first;
Measure* m = cs->tick2measure(plPos);{/syntaxhighlighter}
In this case playPos is 84480, but there is no measure at tick 84480 (the final tick is 76800) so m is 0; the playPos refers to the case of "unrolled" repeates.
Is this a difference between "tick" and "utick"?
Linux Mint 17.1, commit a249aea19
What about substituting line 617 of mscore/seq.cpp (see above) with:
{syntaxhighlighter brush:c++;first-line:617;}int plPos = cs->playPos();{/syntaxhighlighter}
(i.e. cs->playPos() instead of playPos->first)?
I tested it and it seems to work fine, but I am not familiar enough with this part of the code.
That should work.
Ok, thank you.
PR:
https://github.com/musescore/MuseScore/pull/1918
Fixed in 426c5ec824
Automatically closed -- issue fixed for 2 weeks with no activity.