[branch 1.2] [trunk] copying straight chords into tuplet brackets causes corruption

• Oct 10, 2009 - 17:02
S2 - Critical

On r2148:
1. Create a blank score
2. Create a triplet
3. Insert chords into the first two slots in the triplet, and leave a rest in the last one (single notes don't make it crash, only chords)
4. Select all of the notes in either slot and copy them
5. Select the final slot (which should be a rest), and paste the chord
6. Musescore crashes


I check Sibelius and when you try to copy something starting in a tuplet, you have a very nice dialog saying "You can't copy this passage as it intersects a tuplet". I guess we could do something like this?

While checking this, I tried something else

  1. Create new score in 4/4
  2. In first measure, create an half note and 4 8th rests
  3. In second measure, create a tuplet of 3 quarters
  4. Select the first half note and copy it
  5. Select the last 8th rests and paste
  6. The result looks "good" but if you right click on the new 8th note, you have access to a tuplet menu
  7. If you select remove tuplet from the menu, you destroy the timing

Attached is a file to reproduce the problem. Please note that there is no tuplet menu element in this file, since save or load removed it.

For the record, Sibelius allows such a manipulation. The tuplet is not removed and contains a dotted quarter notes + a 8th rest + quarter. So once the previous measure is full (with an 8th), the remaining duration (the dotted quarter) is included in the tuplet by reducing its size by 1/3.

Attachment Size
tuplet_paste.mscz 1.8 KB

The tuplet menu that Lasconic reports in comment #3 above goes away after a reload. Apart from the tuplet menu, the current behavior seems fine to me. Sibelius' behavior is fine too.

Pasting a tuplet accross a barline is not easy and lead to weird behavior and possible time corrupition.
Sibelius displays a message "You can't paste here as one of the tuplet would cross a barline"

Latest revisions do not crash or corrupt the score so i changed status to "normal". The behaviour should be enhanced by showing a dialog explaining the user what did not work.

You are right. It does not work for copied ranges. I tested with copying only the half note which is a simpler case which works. The current "paste" code for selected ranges cannot be fixed easily so it may be better to postphone the fix.

Status (old) postponed active

Reactivating this critical bug report to see whether it still applies to the trunk.

The original bug is fixed on branch 1.2. It was fixed as part of
issue #14648: Copying from within a tuplet bracket to the same or another or to a normal rest produces strange results .
For the trunk a patch has been proposed at time of writing, but not been accepted yet.

The issue of comment #3 works fine in branch 1.2. The result is:
If you start off with a chord, the result is this:
The eighth note in the second bar offers a tuplet menu. If you delete the tuplet and undo, you get this:

In the trunk, like in the branch, it works fine with a single note, but with a chord you get this:

Attachment Size
3057-1.png 4.95 KB
3057-2.png 4.72 KB
3057-3.png 4.89 KB
3057-4.png 5.9 KB
Title Crash on copy/paste triplet notes [branch 1.2] [trunk] copying strainght chords into tuplet brackets causes corruption

Actually, you don't even need to make the example so difficult.
Take a bunch of 1/8 triplets. Then copy a straight 1/8 chord from elsewhere onto one of the triplets.
You get this in branch 1.2 and trunk (the difference is that the trunk shows the "3" for the first two notes):
I should mention: The processing is in Score::pasteStaff (in cmd.cpp).

Attachment Size
3057-5.png 13.23 KB
3057-6.png 24.44 KB
Title [branch 1.2] [trunk] copying strainght chords into tuplet brackets causes corruption [branch 1.2] [trunk] copying straight chords into tuplet brackets causes corruption

"Straight" ;-)