Some scores crash Musescore when Swing Playback is enabled

• Jul 17, 2014 - 17:21
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

However I can't work out how to reproduce such a score. I do have a small test case however, much reduced from a larger score created in 1.3.
I've tried to strip out all extraneous xml with a text editor (including the tag and the custom beam grouping in the time signature) but the crash still occurs.
To cause a crash, open the score, turn on Swing playback, and play the score.
Alternatively, open the score, turn on Swing playback, save the score, then open it again.

I have tried to make a new score with the same time signature and anacrusis, but to no avail - this doesn't cause a crash.

Attachment Size
TESTstripped.mscx 4.87 KB
TEST.mscx 7.92 KB

Comments

This is partially a by-product of the bug where the pickup/anacrusis causes the swing to be backwards. The crash occurs if the last note of the score *ends* on an offbeat, which will happen if there an offbeat anacrusis or if the last measure just happens to be 7/8 or something else with an odd number of half beats.

shredpub: before calling isSubdivided on the next chordrest, be sure there *is* a next chord rest. Or, maybe simpler, just have isSubdivided return false if the input chord is 0.

Here's a good test. I used 7/8 to keep this totally separate from the pickup/anacrusis bug. Also, to emphasize an important point that I'd have missed otherwise: even though there are an odd number of eighths in 7/8 time, each measure should start long-short-long-short. So you should have a long at the end of each measure followed by another long at the start of the next measure. This means you definitely *must* use rtick() to get the tick value for each chord so that each measure starts at 0. Otherwise every even-numbered measure will come out backward. This same file should serve as a test for both - making sure it doesn't crash if the last note of the score ends on an offbeat, and making sure each measure starts with a "long".

Attachment Size
swing-odd.mscz 1.64 KB