Drag and drop a breath & pause symbol from the score to a custom palette crashes the program, including the opening of the 3.5 if such a symbol was added in a previous version in custom palette

• Aug 10, 2020 - 06:44
Reported version
3.5
Priority
P0 - Critical
Type
Functional
Frequency
Few
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

Version 3.5 / Windows10

1) Default score
2) Insert/Create a new palette
3) Add a Breath or Pause symbol on your score
4) Drag and drop (Ctrl + Shift) this symbol into the custom palette

Result: the program shuts down

This is the cause (at least one of) most likely of the crashes reported on forums at the opening of version 3.5 the last few hours, for example: https://musescore.org/en/node/308837#comment-1017358

I.e. , if the user already had one of these symbols in a custom palette from a previous version, he can no longer open the 3.5

To recover version 3.5: Revert to Factory Settings via Command line.


Comments

Difference between that NAV palette's breath:

    <Cell name="Breath" custom="1">
      <Breath>
        <symbol>breathMarkComma</symbol>
        <track>0</track>
        </Breath>
      </Cell>
 

and the same breath from the advanced workspace:

        <Cell name="Breath mark (comma)">
          <Breath>
            <symbol>breathMarkComma</symbol>
            </Breath>
          </Cell>
 
Title Drag and drop a breath & pause symbol from the score to a custom palette crashes the program Drag and drop a breath & pause symbol from the score to a custom palette crashes the program, including the opening of the 3.5 if such a symbol is present in a custom palette
Title Drag and drop a breath & pause symbol from the score to a custom palette crashes the program, including the opening of the 3.5 if such a symbol is present in a custom palette Drag and drop a breath & pause symbol from the score to a custom palette crashes the program, including the opening of the 3.5 if such a symbol was added in a previous version in custom palette

Easier workaround: go to %LOCALAPPDATA%\MuseScore\MuseScore3\workspaces (on Windows, for Linux and Mac there are similar places) and delete the 'broken' *.workspace file

Workaround No Yes

Stack trace:
1 std::_Rb_tree, std::_Select1st>, std::less, std::allocator>>::empty stl_tree.h 993 0x1043a0c
2 std::map::empty stl_map.h 458 0x102be18
3 Ms::StaffTypeList::staffType stafftypelist.cpp 29 0xb6c208
4 Ms::Staff::staffType staff.cpp 1007 0xa33bd1
5 Ms::Staff::lines staff.cpp 1510 0xa35e82
6 Ms::Breath::layout breath.cpp 68 0x8c7109
7 Ms::paintScoreElement palettetree.cpp 999 0x4f734d
8 Ms::PaletteCellIconEngine::paintCell palettetree.cpp 1147 0x4f7c3b
9 Ms::PaletteCellIconEngine::paint palettetree.cpp 1159 0x4f7d06
10 QIcon::paint(QPainter *, QRect const&, QFlags, QIcon::Mode, QIcon::State) const 0x61a0afa3
11 Ms::QmlIconView::paint qmliconview.cpp 37 0x58cc36
12 QSGDefaultPainterNode::paint() 0x6e6507f0
13 QSGDefaultPainterNode::update() 0x6e65149c
14 QQuickPaintedItem::updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *) 0x6e6b176c
15 QQuickWindowPrivate::updateDirtyNode(QQuickItem *) 0x6e6a1d0a
16 QQuickWindowPrivate::updateDirtyNodes() 0x6e6a252b
17 QQuickWindowPrivate::syncSceneGraph() 0x6e6a39e7
18 QSGDefaultLayer::updateTexture() 0x6e65544a
19 QSGDefaultLayer::updateTexture() 0x6e65623a
20 QSGDefaultLayer::updateTexture() 0x6e656606
...

Seems the code

void Breath::layout()
      {
      bool palette = (track() == -1);
      if (!palette) {
            int voiceOffset = placeBelow() * (staff()->lines(tick()) - 1) * spatium();

goes horribly wrong, it doesn't seem to recognize that this breath is meant for the palette (track() is not -1 but 1174746023995197525, which looks like some random number, probably from a not initialized variable?)

Dragging a rest to a palette gives this stack trace:
1 std::_Rb_tree, std::_Select1st>, std::less, std::allocator>>::empty stl_tree.h 993 0x1043a0c
2 std::map::empty stl_map.h 458 0x102be18
3 Ms::StaffTypeList::uniqueStaffType stafftypelist.h 40 0xfd58ee
4 Ms::Staff::staffTypeForElement staff.cpp 1022 0xa33c7c
5 Ms::Rest::layout rest.cpp 432 0x9e9297
6 Ms::paintScoreElement palettetree.cpp 999 0x4f734d
7 Ms::PaletteCellIconEngine::paintCell palettetree.cpp 1147 0x4f7c3b
8 Ms::PaletteCellIconEngine::paint palettetree.cpp 1159 0x4f7d06
9 QIcon::paint(QPainter *, QRect const&, QFlags, QIcon::Mode, QIcon::State) const 0x61a0afa3
10 Ms::QmlIconView::paint qmliconview.cpp 37 0x58cc36
11 QSGDefaultPainterNode::paint() 0x6e6507f0
12 QSGDefaultPainterNode::update() 0x6e65149c
13 QQuickPaintedItem::updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *) 0x6e6b176c
14 QQuickWindowPrivate::updateDirtyNode(QQuickItem *) 0x6e6a1d0a
15 QQuickWindowPrivate::updateDirtyNodes() 0x6e6a252b
16 QQuickWindowPrivate::syncSceneGraph() 0x6e6a39e7
17 QSGDefaultLayer::updateTexture() 0x6e65544a
18 QSGDefaultLayer::updateTexture() 0x6e65623a
19 QSGDefaultLayer::updateTexture() 0x6e6567e3
20 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x2abb7bdc
...

So very similar indeed.

Fix version
3.5.1