Assert when trying to save file

• Jul 4, 2022 - 06:02

Musescore 3.6.2 on Arch Linux. Trying to save the new copy of a score after using Unroll Repeats. Musescore crashes and gives the following assert error:

/build/musescore/src/MuseScore/libmscore/measure.cpp:unknown: ASSERT: "first()" in file /build/musescore/src/MuseScore/libmscore/measure.cpp, line 1983

Every time I get to this stage, I can reproduce this with this score. (Sometimes it crashes on the unroll itself, I have yet to investigate that.) I made a simple score to test this on and I could not reproduce the behavior.

I can upload the score in question if needed, but didn't do it proactively because it's not a public domain score. Otherwise, just let me know what additional information is needed.


Attached score.

Seeing as the appimage is built to have the asserts as noops, I'll file a bug with the Arch Linux package for this. I presume this is still a bug with Musescore however, so I'll be happy to help debug this as needed.

Attachment Size
Kvmbia_Okvlt_JessCollab.mscz 65.91 KB

In reply to by Jojo-Schmitz

There are 2 bugs:
1. The fact that the Arch package is a debug build. I have already filed this with Arch's bugtracker
2. The fact that this assert is failing. This will be true with any debug build, and indicates that there is a bug causing this assert to fail. That is the point of asserts, is it not?

In reply to by Jojo-Schmitz

I don't think it is. That assert failing seems to indicate that Musescore was told to write a measure whose _segments._first pointer was not initialized. Immediately after asserting that that pointer and the last pointer are initialized, it silently skips writing that measure to the file if either first or last were not initialized. Therefore, something is getting skipped when I save a score and this assert would have been hit.

Do you still have an unanswered question? Please log in first to post your question.