Crash when paging through file containing multi-measure rest

• Oct 23, 2014 - 20:09
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

Crash reported in http://musescore.org/en/node/37316 reproduces consistently using todays trunk. Just load the file, set continuous view and scroll. This results in a segmentation fault.

Stack trace:
#0 QListData::size (this=0xc8) at qlist.h:96
#1 0x0000000100092395 in QList::size (this=0xc8) at qlist.h:137
#2 0x00000001000914ce in Ms::System::staff (this=0x0, staffIdx=1) at system.h:132
#3 0x000000010085de16 in Ms::BarLine::getY (this=0x1079bc5d0, y1=0x7fff5fbfb1d0, y2=0x7fff5fbfb1c8) at /Users/lvi/dev/MuseScore/libmscore/barline.cpp:195
#4 0x0000000100862227 in Ms::BarLine::layout (this=0x1079bc5d0) at /Users/lvi/dev/MuseScore/libmscore/barline.cpp:907
#5 0x000000010009025f in Ms::ContinuousPanel::draw (this=0x10f4a6f40, painter=@0x7fff5fbfbc68, el=@0x7fff5fbfb940) at /Users/lvi/dev/MuseScore/mscore/continuouspanel.cpp:368
#6 0x000000010008e482 in Ms::ContinuousPanel::paint (this=0x10f4a6f40, p=@0x7fff5fbfbc68) at /Users/lvi/dev/MuseScore/mscore/continuouspanel.cpp:165
#7 0x0000000100627140 in Ms::ScoreView::paintEvent (this=0x10f4a6630, ev=0x7fff5fbfc380) at /Users/lvi/dev/MuseScore/mscore/scoreview.cpp:1645


Comments

There is something strange in the xml score: all the full-measure rests in the 2/4 measures are whole rests, i.e. 4/4 rests. They are therefore not imported correctly and they cause measure corruption (in particular if you try to delete one of them, but also if you look at measure division in continuous mode). Could this score-corruption be the cause of the crash?

Disabling the "create multi measure rest" style setting prevents the crash. Also disabling followed by enabling prevents it. Suggests something is not OK in the multi measure rest data structures.

Title Crash when paging through The Stolen Child - vocal score - RB - 2014-10-22.mxl Crash when paging through file containing multi-measure rest

Does not seem to be related to MusicXML import at all, attached is a very simple MuseScore file showing the exact same crash. It also crashes on a null pointer in Ms::BarLine::getY().

Attachment Size
MeasuresFour.mscx 4.75 KB

Confirmed, I can make that simple file crash if I go to continuous view, zoom in (so it takes more than a screenful to show it), and start scrolling.