Skip to content

Conversation

@mathesoncalum
Copy link
Contributor

Resolves: #21953

This is the result of a corrupted score where the notes in the excerpts don't match those in the main score. The crash happens when calling findLinkedChord. This seems to be a pretty rare situation and its unclear how the score reached this state. Regardless, we should try to avoid a crash here with a null check (and assert).

Chord* c1 = findLinkedChord(cr1, score->staff(staffIdx));
Chord* c2 = findLinkedChord(cr2, score->staff(staffIdx + sm));

IF_ASSERT_FAILED(c1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW: 3.x does the same here, basically (it just returns when there's no c1)
Apparently a backport of #10654 which got closed in favor of #13183

Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 10, 2024
Backport of musescore#22314

Seems to build upon an backport of musescore#10654, which got closed in favor of musescore#13183
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 10, 2024
Backport of musescore#22314

Seems to build upon an backport of musescore#10654, which got closed in favor of musescore#13183
@RomanPudashkin RomanPudashkin merged commit a3c522d into musescore:master Apr 11, 2024
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request Apr 11, 2024
Backport of musescore#22314

Seems to build upon an backport of musescore#10654, which got closed in favor of musescore#13183
@mathesoncalum mathesoncalum deleted the 21953-regroup_rhythms_crash branch April 22, 2024 09:18
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.

MuseScore crash after apply "Regroup Rythms" (one score)

4 participants