[trunk] Notes exceeding measure contents corrupt measure total value (rev. 4304 regression)

• May 26, 2011 - 19:35
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: rev. 4309; Ubuntu 11.04, Qt SDK 1.1 (Qt lib 4.7.3) / Windows XP Qt SDK 10.04

Steps:

1) Load or create a score of any kind
2) Add one or more notes so that the last one 'overflows' into the next measure; for instance: 2 minims in a 3/4 measure or 1 minim and 1 semibreve in a 4/4 measure

Result: the 'overflowing' note is not split in two tied parts, one before and one after the bar line; rather, it is completely put into the measure and the measure total value is corrupted.

A sample screen shot is attached.

Notes:

1) This happens since rev. 4304.

2) Priority set to critical as the issue corrupts entered data.

Attachment Size
trunk_note_overflow.png 7.52 KB

Comments

In my R4309, I found that initially the note would split across the first and second bar. But, now if I delete the last note that is tied into the second bar, select the rest and drop a half-note on it, I now have a measure with 5 beats.

1. Create a standard 4/4 score.
2. Go into note entry and in the first bar type A B C D to create 4 quarter notes. Exit note entry
3. Select the last note in the first bar and change it to a half. It will split across bar 1 to 2, 2 quarter notes tied.
4. Delete the last quarter in bar 1, a rest will appear and the tie is gone.
5. Now enter note entry mode, and drop a half-note on the rest in measure 1n. Presto, a measure with 5 beats.

As I continued working, extra treble and bass clefs started appears in every other bar.

I have tried with different time signatures, with different combinations of staves and clefs: any time I enter a note which should cross a measure boundary (and be split across a bar line), the note is put completely in the previous measure and the measure itself gets extra beat(s).

In practice, to quote your procedure, if in your step 2), A B C are crochets and D is a minim, I immediately get a 5-beat measure, without bothering with steps 3), 4) and 5).

Or, entering | A B C D E | F crochets, going back to E and entering a new minim note on it, I get a 5-beat measure, without even having to delete the E (be it tied or not to the next note).

The only way to get a note tied across a bar line is:

1) enter the note shortened (so that it does not cross the measure boundary)
2) exit note entry mode
3) select the note
4) change its value to the intended duration

This is how I create the above-attached screen-shot, but it is obviously not the way to go...

Can anybody else confirm this or not?

Thanks,

M.

"In practice, to quote your procedure, if in your step 2), A B C are crochets and D is a minim, I immediately get a 5-beat measure, without bothering with steps 3), 4) and 5)."

Bug confirmed. I was entering quarters, then changing the last to a half.

Status (old) active patch (code needs review)

A possible source of the error is at the end of function Fraction Score::makeGap() (file cmd.cpp), where the returned value for the gap created (to accommodate the new note) is increased too much.

The patch attached removes the last statements of the function, correcting the issue. I have tested it in several sessions of note input and I could not detect any side effect.

HOWEVER, the logic of the function is not easy to follow and, assuming the removed statements were there for some reason, the patch should be reviewed by someone more familiar with it (Werner?).

Thanks,

M.