MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
If the system has no first measure, it has no measures at all, so no need to consider this system
Add extra safety check that stick < etick, but this should not be necessary, because at that point it is already clear that the system contains at least one measure, and a measure cannot have a length of zero ticks, so etick will necessary be greater than stick.
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.
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, whileSlurTieLayout::layoutSystem
assumes that the system does have measures. This led to the crash.Resolves: https://github.com/musescore/MuseScore/issues/23294