Musescore crashes upon copy-pasting tremolo across bar lines
S2 - Critical
1) Create a tremolo that alternates between two notes
2) Move the notes such that their duration causes the tremolo notes to cross a bar line
Expected behaviour: either Musescore obliges and allows the tremolo to be played, OR Musescore forbids the action and displays an error message (as is the case with trying to add tuplets between bar lines)
Actual behaviour: Musescore crashes.
Doesn't crash in 3.5.2 nor in 3.x latest development build, but doesn't look nice:
And if I try to paste it in a way so that one of the notes would cross the barline, like paste a half-note tremolo on the last quarter rest of a measure, I do get the error message that this is a forbidden action for a tremolo
This crashes for me in latest 3.x:
It crashes here because
_tremolo->chord2()is NULL. Checking for NULL before dereferencing prevents the crash, but indeed the result does not look nice.
https://github.com/musescore/MuseScore/pull/7201 added the NULL check that I was talking about, so this no longer crashes.
Indeed, that's what my PR did add, to partly resolve https://musescore.org/en/node/315002
Is this here then a duplicate of #315067: Swapping notes in a two-note tremolo causes corrupt tremolo (and crash), or vice versa?
I'm not sure. It may just be another way to achieve a tremolo that has no second chord.
Came up again in #322557: Crashes every attempt to change time signature when tremolos badly input