[branch 1.2] Crash on copying tuplets

• Jan 12, 2012 - 20:22
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: SVN rev. 5215; compiled with latest Qt SDK (Qt Creator 2.4, Qt lib 4.7.4) under Windows XP SP3.

Steps:
1) open any score with tuplets as source (a very simple source score with just 1 tuplet is attached)
2) open any score as destination (a very simple destination score is attached)
3) select the measure containing the tuplet (or just the notes making the tuplet) in the source score
4) paste into the destination score.

Result:
The program crashes.

Analysis:

crash happens in function ChordRest::readProperties(QDomElement, QList&, Measure*) (file chordrest.cpp, line 279), because in the statement:

measure->add(tuplet());

the object measure = 0.

The parameter measure is passed as 0 by Score::pasteStaff(QDomElement, ChordRest*) (file cmd.cpp, line 2465) via Chord::read(QDomElement, QList&, Measure*) (file chord.cpp, line 882).

Thanks,

M.


Comments

SteveMerrony
Jan 31, 2012 - 10:17

I am also seeing this with a single score. Exact same crash when pasting triplets, even within same voice.

I have amended the title - hope that's OK.

#0 ChordRest::readProperties (this=0x21814c0, e=, tuplets=..., measure=0x0)
at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/mscore/mscore/chordrest.cpp:279
#1 0x00000000004874d5 in Chord::read (this=0x21814c0, e=..., tuplets=..., measure=0x0)
at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/mscore/mscore/chord.cpp:882
#2 0x000000000049fbfb in Score::pasteStaff (this=0x210dff0, e=..., dst=0x22fc2b0)
at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/mscore/mscore/cmd.cpp:2465
#3 0x00000000004a2aee in Score::cmdPaste (this=0x210dff0, view=)
at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/mscore/mscore/cmd.cpp:2364
#4 0x0000000000472d29 in ScoreView::normalPaste (this=0x22713b0) at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/mscore/mscore/scoreview.cpp:2410
#5 0x000000000044cef3 in ScoreView::qt_metacall (this=0x22713b0, _c=QMetaObject::InvokeMetaMethod, _id=, _a=0x7fffffffd190)
at /home/steve/SOFTWARE/MuseScore/mscore-0-9-6/build/mscore/moc_scoreview.cxx:127