Removal of the final barline causes a crash

• Nov 2, 2016 - 12:34
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

GIT commit: 32d3fb6 / Windows 7

1) "My First Score"
2) Select the end barline
3) Delete (Ctrl + Del)

Result: crash

last barline.jpg


Comments

confirmed, stack tzrace:
1 Ms::SegmentList::last segmentlist.h 43 0xde7638
2 Ms::Measure::last measure.h 178 0xdef730
3 Ms::Score::cmdJoinMeasure joinMeasure.cpp 32 0x823db3
4 Ms::Score::cmd cmd.cpp 2367 0x7ad491
5 Ms::ScoreView::cmd scoreview.cpp 3411 0x414c4b
6 Ms::MuseScore::cmd musescore.cpp 4944 0x4a019b
7 Ms::MuseScore::cmd musescore.cpp 4498 0x49dfbe
8 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 830 0x69aee8
9 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
10 Ms::ScoreTab::actionTriggered moc_scoretab.cpp 193 0x6a1217
11 Ms::ScoreTab::qt_static_metacall moc_scoretab.cpp 95 0x6a0ee9
12 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
13 ZN12QActionGroup7hoveredEP7QAction 0x1be55295
14 ?? 0x22130808
15 ZN7QAction8activateENS_11ActionEventE 0x1be54248
16 ?? 0x28ce08
17 ?? 0x1ca55690
18 ZN7QThread18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv 0x68a68380
19 ZN7QThreadD2Ev 0x6889adc0
20 ZN7QObject11customEventEP6QEvent 0x68a06950
...

Furtermore a simple Del doesn't remove the end-barline, it does not make it a normal barline.

Title Removal of the end barline causes a crash Removal of the last barline causes a crash
Status (old) active patch (code needs review)

Fix for the crash seems easy, in cmdJoinMeasure() a check is missing whether there is a measure to join with the one that holds the barline.

See https://github.com/musescore/MuseScore/pull/2877

Remains the issue that the barline itself can't get delete, but that seems a different issue anyway.
And a pretty minor onr, it is inly the end-barline as the final barline, and it can get changed into any other barline via Palette or inspector. It just happens to Default to en end-barline, which even may be by design