CRASH if try changing duration of Repeat Measure
affects both 2.0.3 and 3.0.0 676b0a3.
Reproduction Steps:
1. Drag Repeat Measure to any measure
2. Click on augmentation dot
CRASH!!!
When reproducing my own branch in windows 10 Home from qtcreator, I get a SIGFPE (Arithmetic exception), but I can't copy and paste the stack trace because the bug crashed QtCreator as well! Fortunately, I grabbed a screenshot:
One possible easy fix would be to disable augmentation dot for repeat measure. It might even be a good idea to prohibit setting repeat measure to the other durations as well, since repeat measure currently doesn't understand anything other than a measure duration. However, maybe eventually we want to allow #127396: Simile Marks inside measure to indicate repeat previous beat (playback & display) & MusicXML i/o for "beat-repeat" & "slash" in which case might want to allow changing repeat measure duration (and maybe even change the name from "RepeatMeasure" to "SimileMark".)
Comments
Also I can crash by selecting the repeat measure element and pressing '8' to change duration to longa, which will fail this assert:
When getting #21649: [MusicXML] Repeat measure sign not exported or imported working, I was using a simple int in RepeatMeasure to represent the number of measures that it covers. Now that I'm starting to implement #10220: Add a two and four measure (multi-measure) repeat sign with playback, I'm exploring whether to store the duration of the measure repeat as the inherited Rest's duration. I'm going to treat the duration type as V_MEASURE...anyway I don't know if representing multi-measure durations as type V_MEASURE is an abuse of that type or not. But anyway, if I go that route, I might be able to fix the longa & double-longa part of this crash, by simply treating them as V_MEASUREs of durations that are multiple of a measure (based on the time signature of the starting measure of the multi-measure repeat). Anyway, I might also disable the use of augmentation dots for RepeatMeasures as well.
although treating double or longa as multi-measure repeats wouldn't make logical sense for very large time signatures...
argh...gave up on #3 ...was causing my tests to fail, so I'm going back to using a simple int instead of trying to use the Fractional duration to represent the number of measures covered, so disregard #3.
Again, simplest solution is just prohibit changing duration of RepeatMeasure elements, although I was hoping to somehow incorporate that into multi-meas repeats or simile marks.
Note that pressing Q or W on a repeat measure element will also cause this same crash.
In my PR for #10220: Add a two and four measure (multi-measure) repeat sign with playback, I'm going to have Q & W be the only supported ways to change the duration of repeat measure element, and I will forbid changing duration any other manner (since doesn't make logical sense for an entity that can only be a pos int number of measures.
Fixed in branch 2.1, commit e61d435c8f
fix #137116: CRASH if try changing duration of Repeat Measure
Only fixed in 2.1 branch for now.
Still not fixed for commit c65ab20. However it doesn't crash for durations less than the measure length (like 8th note in 2/4 etc...).
See https://github.com/musescore/MuseScore/pull/4043
Fixed in branch master, commit c18d395567
fix #137116: update input state for RepeatMeasure, do not try to change RepeatMeasure's length
Fixed in branch master, commit 83ee4cd1b4
Merge pull request #4043 from dmitrio95/137116-fix-repeatmeasure
fix #137116: fix some problems related to RepeatMeasure
Automatically closed -- issue fixed for 2 weeks with no activity.
Automatically closed -- issue fixed for 2 weeks with no activity.
Automatically closed -- issue fixed for 2 weeks with no activity.
Automatically closed -- issue fixed for 2 weeks with no activity.