Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #26099: Crash when opening score and pressing direction key #26322

Merged

Conversation

mathesoncalum
Copy link
Contributor

@mathesoncalum mathesoncalum commented Feb 4, 2025

Resolves: #26099

Problem is as follows:


  1. When opening a score via keyboard, we select the “first element in the score”.

  2. In scores with more than one staff, the first element in the score is a barline (an element with grips)

  3. We call NotationInteraction::nudgeAnchors which causes a crash because NotationInteraction::startEditGrip was never called.

The solution I've gone for in this PR is to check whether a grip edit has started before calling nudgeAnchors. We could potentially include an additional step where we immediately start editing the barline's grips on open - but my feeling is that this behaviour is probably undesirable (see video).

grips.mov

@mathesoncalum mathesoncalum requested a review from miiizen February 4, 2025 10:28
@mathesoncalum
Copy link
Contributor Author

Oh and for some additional fun - this crash isn't actually reachable in debug builds due to an assertion failure in PlaybackController::seek (but that's a separate issue).

@DmitryArefiev
Copy link
Contributor

Tested #26099 on Win10, Mac13.6, LinuxUbuntu24.04.1 LTS - FIXED

@DmitryArefiev DmitryArefiev merged commit 18caa42 into musescore:master Feb 5, 2025
11 checks passed
@mathesoncalum mathesoncalum deleted the 26099-keyboard_nav_crash branch February 5, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash after opening and navigating score with Right arrow
3 participants