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 crash on transpose of specific 3.6 score #16770

Merged
merged 1 commit into from Mar 14, 2023

Conversation

mike-spa
Copy link
Contributor

Resolves: #15727

The problem arises because, in this specific file (see related issue), the Clarinet 1 part has gone out of sync with the score, and there is an orphaned KeySig event which, for some reason, exists in the Clarinet 1 part, but not in the score.
image

How or why exactly that happened, I really can't tell. I've tried everything I could think of to recreate the same issue in Musescore 4, but I couldn't (and by looking at the code, it really seems not possible to do so with the score-part model we have in Musescore 4). So I'm inclined to think that this is entirely a 3.6 problem (the file was originally created in 3.6 and the crash indeed also happens in 3.6, so it isn't about anything new that we have introduced).

In terms of avoiding the crash, it is simply a matter of null-checking the segment before using it (which I think is worth doing anyway for safety, given that's it's obtained from a function that may return null).

@RomanPudashkin RomanPudashkin removed the request for review from Eism March 14, 2023 08:25
@RomanPudashkin RomanPudashkin merged commit 79c77b6 into musescore:master Mar 14, 2023
11 checks passed
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.

[MU4 Issue] app crashes when transposing
3 participants