Crash on playback of score with MM rest at the end
Reported version
3.5
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
The crash happens when the score ends in multi-measure rests. Press the shortcut to move to the the last system and it will be fine, press it again and you will get the crash. It didn't crash for me when mm rests were turned off.
In a Debug build I get:
Fatal: ASSERT: "tick <= lastMeasure()->endTick()" in file ...\MuseScore\libmscore\score.cpp, line 3811
void MasterScore::setPos(POS pos, Fraction tick)
{
if (tick < Fraction(0,1))
tick = Fraction(0,1);
Q_ASSERT(tick <= lastMeasure()->endTick());
Never check for error conditions you can't handle?
But clearly a regression, 3.4.1 does not crash there. And the above code hasn't been changed in quite a while?
Fix version
3.5.1
Comments
I wonder whether this is related to #284887: Crash on ending score playback, or rather whether the fix (one of the commits in the PR linked to it) would help here too? It is the very same line of code...
It indeed does. So I'll steal that one commit for a PR to fix this issue here
see https://github.com/musescore/MuseScore/pull/6437
Update: I can trigger the crash though when user is ON a MM rest first and then invokes the next system command when in Note-Entry. On further study I notice from a ChordRest* -> measure() -> system() call chain, the system is invalid when the measure was a MM measure, and in that case I can get the system via: measure->mmRest1()->system();
So even though JoJo's fix takes care of that use case, I think I should still update this
Personally I think it's Bogus that the code is such that measure()->system() is invalid from a MM rest position. I think that should be updated so it never returns null
Update: I think actually it's when in Note Entry and there's no active ChordRest selected which is what happens when moving to a Multi-Measure Rest measure. Maybe there's no actual ChordRest from which to get the measure and then null is returned.
Update: I notice also [next/prev measure] commands work though. I've noticed that when in Note Entry mode, while in a MMRest, there's no motion of the Note Entry cursor even though it is traversing the "measures underneath" the MMRest. If you get out of NE and then back in, then the entry cursor is updated, but if not it juts stays there until getting uot of the MMRest. That should be updated also.
See also #309005: New Navigation Commands to handle MMRests appropriately, likely to fix the root cause
fixed in 375b47e6
oops
Automatically closed -- issue fixed for 2 weeks with no activity.