Crash when pasting measures in another measure with different actual duration

• Oct 8, 2014 - 08:17
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Open the attached score created from scratch with MuseScore 3855d63 on Xubuntu 14.10.

Select the last two measures and do "Ctrl+C".

Select the first measure and do "Ctrl+V".

MuseScore crashes with this output:

addClone Rest at 3840 1/16
addClone Rest at 3960 1/4
addClone Rest at 4440 1/2
TDuration(13/16): not implemented
Exception en point flottant (core dumped)

Comments

It is a variant of #28506: Copy / paste corrupts next measure when the pasted note crosses the barline. In this case the problem is that the measure is an irregular measure. The crash happens at line 479 of libmscore\paste.cpp.
The code splits the rest into a first part fitting into the measure and then the second part which falls outside the measure. The second part is splitted into a set of valid durations.
The problem here lies in the first part, since we are trying to create a duration element of length given by the difference between the measure duration and the duration of the first rest ( 29/16 - 16/16 = 13/16 ) to fill up the measure. The solution could be to implement the splitting into a set of valid durations also for the first part, as it is done when inserting a note/rest in note insert mode.