Musescore crash when inserting a frame in a part before the existing title frame

• Nov 5, 2020 - 13:03
Reported version
3.5
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

Insert a frame "in front of" a "first frame" in a part makes Musescore crash every time.

Attachment Size
example.mscz 7.02 KB

Comments

Severity S4 - Minor S2 - Critical
Priority P1 - High

I confirm the crash. Somehow it seems there becomes confusion about which score certain elements belong to. The first time I tried it with the example score, the crash happened processing notes, then when I tried reproducing it from scratch, it happened processing barlines.

No time to investigate further right now, but one possible guess is that when we insert the new frame into the score & parts, somehow its "next" pointer is pointing to the old frame in a different score/part.

Title Musescore crash. Musescore crash when inserting a frame in a part before the existing title frame

Stack trace:
1 Ms::Staff::show staff.cpp 1156 0xa59044
2 Ms::Score::layoutSystemElements layout.cpp 3873 0x9a4b6a
3 Ms::Score::collectSystem layout.cpp 3827 0x9a470b
4 Ms::LayoutContext::collectPage layout.cpp 4468 0x9a92a2
5 Ms::LayoutContext::layout layout.cpp 4781 0x9aaef2
6 Ms::Score::doLayoutRange layout.cpp 4769 0x9aae56
7 Ms::Score::update cmd.cpp 302 0xae1430
8 Ms::Score::endCmd cmd.cpp 260 0xae10ce
9 Ms::ScoreView::cmdInsertMeasures scoreview.cpp 4738 0x61115b
10 Ms::ScoreView::::operator()(Ms::ScoreView *, const QByteArray &) const scoreview.cpp 2624 0x6018ef
11 std::_Function_handler>::_M_invoke(const std::_Any_data &, Ms::ScoreView *&&, const QByteArray &) std_function.h 297 0x61fd32
12 std::function::operator()(Ms::ScoreView *, QByteArray const&) const std_function.h 687 0x1066d9d
13 Ms::ScoreView::cmd scoreview.cpp 2826 0x6070d7
14 Ms::ScoreView::cmd scoreview.cpp 2077 0x5fec07
15 Ms::MuseScore::cmd musescore.cpp 6651 0x433cbe
16 Ms::MuseScore::cmd musescore.cpp 6073 0x430598
17 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 524 0x5abe12
18 void doActivate(QObject *, int, void * *) 0x68b9994b
19 Ms::ScoreTab::actionTriggered moc_scoretab.cpp 226 0x5cabd4
20 Ms::ScoreTab::qt_static_metacall moc_scoretab.cpp 111 0x5ca643
...

Here when processing beams?

Darn, plugging all 4 of those results in a failed assertion later:

Fatal: ASSERT failure in QList<T>::operator[]: "index out of range", file .../Qt/.../include/QtCore/qlist.h, line 575