musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.29k stars 2.66k forks source link

Musescore crashes when changing note type Flatpak (assertion failure) #24730

Open MiniApollo opened 1 month ago

MiniApollo commented 1 month ago

Issue type

Crash or freeze

Description with steps to reproduce

  1. Open attached file
  2. Select a whole row with shift
  3. Click on any note multiple times on the top bar to change row note type
  4. Musescore crashes

Expected behaviour: Notes changes type

Supporting files, videos and screenshots

TestingZip.zip

What is the latest version of MuseScore Studio where this issue is present?

4.4.1

Regression

I was unable to check

Operating system

Flatpak on Gentoo Linux Wayland Hyprland

Additional context

Error Message:

12:27:32.359 | ERROR | main_thread | Score::undoAddElement | ASSERT FAILED: c1 /run/build/musescore/src/engraving/dom/edit.cpp:6366 12:27:32.359 | ERROR | main_thread | crashCallback | Oops! Application crashed with signal: [11] SIGSEGV-Invalid memory reference

Checklist

cbjeukendrup commented 1 month ago

The fact that you get this kind of assertion failures means that it's a debug build. Some package maintainers deliberately enable std assertions because they prefer crashes (which result in the user's work being lost immediately) over undefined behaviour (which is also bad but at least gives the user to possibility not to loose their work, most of the time). But enabling MuseScore assertions doesn't make sense at all: we deliberately have a special assertion macro that lets us specify "emergency exits" to avoid undefined behaviour:

            IF_ASSERT_FAILED(c1) {
                return;
            }

Anyway, of course we need to fix the assertion failure, so we'll just do that, as our influence doesn't reach beyond what's distributed by us (i.e. only the AppImage, and not (yet) the FlatPak).