musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
11.79k stars 2.56k forks source link

Fix crash when inserting text frame after cross-staff slur #23349

Closed cbjeukendrup closed 1 week ago

cbjeukendrup commented 1 week ago

The cause of the crash was that the calculation of stick and etick was wrong, resulting in a non-empty range when the second system contains no measures (but only a text frame for example). In this non-empty range, the spanners belonging to the previous system would be found, and we call SlurTieLayout::layoutSystem with these spanners and the current non-measure system, while SlurTieLayout::layoutSystem assumes that the system does have measures. This led to the crash.

Resolves: https://github.com/musescore/MuseScore/issues/23294