Crash when pasting a note with an articulation if the final note is split between two measures

• Mar 17, 2018 - 21:20
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Steps:
1- Open attached file;
2- Copy the first measure (4/4 note with an articulation);
3- Paste it onto the second (2/4 length) measure -> Crash

I think function Chord::removeMarkings is not properly deleting all traces of the articulations and when adding the chord to the system there is still a reference to a deleted articulation in the second part of the pasted note (i.e. the one falling in the next measure).

Attachment Size
paste_articulation.mscz 2.51 KB

Comments

Hello,
I'm new to develop musescore and try to fix it. There's my opinion.
In common operation, I think this action is illegal. Because the length of the node is execeed the length of the measure. In other words, a note can't be seprated and placed in two measures via pasting. It should do nothing(i.e. pasting without articulations). So, the problem is, it should check out length first. If it satisfied, then paste. But not add then undo. Right?

Hello lingdra,
A note can be separated and placed into two measures via pasting. If you paste a half note onto beat 4 of a 4/4 measure, MuseScore will paste a quarter note in that measure and a quarter note in the next measure and tie the two together. This is not by accident. It was specifically designed to do this. You are certainly free to have your own opinion about this, but I think most people feel that this is the desired behavior.

Okay.
The crash only happens in 3.0.
2.1 and 2.2 split the note as desired and put the accent over the first of the tied notes.
When pasting a range, all three versions will split a chord across the bar line.
When pasting a note, 2.2 and 3.0 will not split it across the bar line, but will shorten the duration of the note to fit in the measure. 2.1 will split the note across the bar line.

The crash affects also the Regroup Rhythms function since, in its current implementation, it is more or less a clone of the paste function.

Status (old) patch (code needs review) fixed
Status fixed

Fixed in branch master, commit db450fd34b

fix #270433: Crash when pasting a note with an articulation if the final note is split between two measures

Fixed in branch master, commit 43d253d251

Merge pull request #3823 from mattmcclinch/270433-remove-markings

fix #270433: Crash when pasting a note with an articulation if the final note is split between two measures