Crash when creating full measure rests

• Apr 15, 2016 - 19:21
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

GIT commit 96d9765/ Windows 7

1) "My First Score"
2) In the first measure: select the whole rest, and change its value (eg for display two half rests)
3) Select this measure
4) Ctrl + Shift + Del

Result: crash

EDIT: the step #2 (create two half rests) is not necessary to get the crash. Simply select a measure, or all the score (as described below)

Alternatively :

1) "My First Score"
2) Ctrl + A
3 Ctrl + Shift + Del

Result: crash
full measure rest.jpg

Works with the 2.0.3: 3c7a69d

Fails on April 14, 2016, with: fe2eea4


Comments

Status (old) needs info active

Always reproducible with ce8065f / Windows 7

Eg with steps:

1) "My First Score" or Treble clef template
2) Ctrl + A
3) Ctrl + Shift + Del

Result: crash

This is what I did and it didn't crash. Only diff is that I'm using a sefl built one (and in debug mode, to crtach the stack trace), not a nightly.

Edit, outch, I was using Ctrl+Del, not Ctrl+Shift+Del. With that I get the crash too.
Stack trace:
1 Ms::Element::isChordRest element.h 618 0xc21b00
2 Ms::Measure::findChordRest measure.cpp 516 0x799867
3 Ms::Score::cmdFullMeasureRest edit.cpp 2429 0x78d69c
4 Ms::ScoreView::cmd scoreview.cpp 3066 0x411c56
5 Ms::MuseScore::cmd musescore.cpp 4411 0x4987b9
6 Ms::MuseScore::cmd musescore.cpp 4026 0x496928
7 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 825 0x687e1e
8 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a07a62
9 Ms::ScoreTab::actionTriggered moc_scoretab.cpp 193 0x68df5d
10 Ms::ScoreTab::qt_static_metacall moc_scoretab.cpp 95 0x68dc2f
11 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a07a62
12 ZN12QActionGroup7hoveredEP7QAction 0x19935295
13 ?? 0x1faa0f58
14 ZN7QAction8activateENS_11ActionEventE 0x19934248
15 ?? 0x28cee8
16 ?? 0x1bee1738
17 ZN7QThread18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv 0x68a66fb0
18 ZN7QThreadD2Ev 0x6889a980
19 ZN7QObject11customEventEP6QEvent 0x68a05a70
20 ZN26QAbstractDynamicMetaObjectD2Ev 0x68a05a40
...

Fix seems simple, just check for el (not being NULL) before calling el->isChordRest() in ...libmscore/measure.cpp, line 516.