Iterating over elements with Alt+right in score with MM rest shows weird barlines, crash is possible
Reported version
3.4
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
1) Create a new score.
2) Turn MM rests on.
3) Start iterating over elements with Alt+right.
Alternative: select the last bar line and press Alt+right.
Result: at the top of the page barlines with grips are drawn. Trying to drag those grips leads to a crash.
This is a partial regression in 3.4 version: in 3.3.4 those barlines were selected (which doesn't seem like it should happen) but were not shown and did not make it possible to crash MuseScore.
Fix version
3.5.0
Comments
I'm preparing a PR to deal with the navigation issues, I'm finding a few places where we can incorrectly navigate into mmrests. That should keep us from getting into this situation. I don't know the code dealing with edit handles so well, if someone else want to try to add sanity checks to prevent crashes if we do somehow still find ourselves with an element selected that is not in fact valid, be my guest.
https://github.com/musescore/MuseScore/pull/5742
Fixed in branch master, commit b5d53248ab
_fix #301436: invalid selection when navigating with mmrests
Resolves: https://musescore.org/en/node/301436
The accessibility navigation commands
(Alt+Left/Right, also Ctrl+Alt+Shift+Left/Right)
were not properly checking for mmrests,
resulting in selection of elements in the underlying measures
that were not valid in the current layout.
This adds the necessary checks.
Mostly just a matter of adding "MM" to various function calls.
In a couple of places, the appropriate function did not exist,
so I added it.
Also corrected errors in Ctrl+Alt+Shift+Left/Right
that occurs when going past the end of a staff,
the code to wrap around to the next staff this case well.
In part this is because the implementation of barlines changed
since the code was written.
Barlines are per-staff now even when spanned,
so the use and management of prevTrack is no longer appropriate._
Fixed in branch master, commit 5a5af39ff6
_Merge pull request #5742 from MarcSabatella/301436-last-element-mm
fix #301436: invalid selection when navigating with mmrests_
Automatically closed -- issue fixed for 2 weeks with no activity.