Regression: Ambitus causes a crash just while clicking on it
After dragging an ambitus (which shows note range, https://musescore.org/en/handbook/early-music-features#ambitus) and click on it, MuseScore 2.3.1 (OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (32-bit): 2.3.1, revision: 0899e9d) immediately crashes. (Although it is a seldom-used "early music feature", it cause crashes so the priority was set to critical.)
In MuseScore 2.1, 2.2 or 3.0 development build (OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (32-bit): 3.0.0, revision: 206532b), crash does not exist.
I know programming, but haven't writing program for MuseScore (GitHub) yet. Also sorry for bad English.
Comments
I can confirm the crash in 2.3.1 (and its lack in 2.2.1). But 2.3.1 is the last of the 2.x series. As the problem doesn't exist in master this issue needs to get closed unfixed, unfortunatly
In reply to I can confirm the crash in 2… by Jojo-Schmitz
But should I create another issue for the octave problem? (totally another problem)
If it is reproducible in master: yes
Out of sheer curiosity I tried to debug this in my still existing 2.3.1 build env: Seems to be a Heisenbug, doesn't happen in Debug! Seems to happen only when built in REELASE mode?
See also #274295: Selecting the ambitus line causes crash
As there apparently will be a 2.3.2, maybe this bug here can get fixed there
Came up again in https://musescore.org/en/node/274500
"As there apparently will be a 2.3.2, maybe this bug here can get fixed there"
+1
See also https://musescore.org/en/node/274295#comment-844193
Maybe you can investigate further?
I can confirm the bug on Windows using the trial release (?) of 2.3.2, but also the fact that I cannot reproduce it under debugger. My assumption is the problem has to do with the Inspector, since I don't get a crash if I turn it off, but I don't actually see a recent change there. Odd, as I see a whole bunch of fields in the Inspector for ambitus that I do not not remember being there. But the only relevant changes I do see for ambitus is the removal of the accessibility functions and a correction for the octave:
https://github.com/musescore/MuseScore/commit/0c059024ff75315133a6be789…
and
https://github.com/musescore/MuseScore/commit/9649548570e0da992b95730aa…
My money is on the first. I don't quite understand what's going on there. I'm guessing the accessibility functions were removed so we could take advantage of inheritance and use generic Element. Not sure why that would cause a crash though.
@Marc: did you see https://musescore.org/en/node/274295#comment-844193 and @cadiz1's findings there? Seem to indicate that the bug relates to the notehead additions for MDL?
Might need to test whether it crashes with a meaningful stack trace in Qt creator's debugger when building for RELEASE
As said here: https://musescore.org/en/node/274295#comment-844193, the issue occurs in May (11/12 May)
This nightly works: 7345a8c
This one crashes when clicking on the ambitus symbol: 6257956
There is three commits between them:
The last mentioned nithlty and the previous commit (https://github.com/musescore/MuseScore/commit/60283b0dffa4f500f5f0f9331…) as intended for noteheads in drumset for percusion instrument.
The next commit after the first mentioned nightly, which works, would be not related ? https://github.com/musescore/MuseScore/commit/3182aa58248ba12012f061317…
And it remains the commit between them: https://github.com/musescore/MuseScore/commit/c2158578cff4d2923f0dcd1a2…
That middle commit indeed got to be innocent.
Ambitus does show notehead, doesn't it? Both other commits deal with those somehow.
In reply to That middle commit indeed… by Jojo-Schmitz
"Ambitus does show notehead, doesn't it?"
I don't know code, but I know an Ambitus looks like two note heads connected by a line.
Yep, that's what I mean
Came up again in #274551: Use of Ambitus in a score causes instability.
See https://github.com/musescore/MuseScore/pull/3825.
This was indeed fixed in the master branch, but it never made it to 2.x.
Edit: Of course, before 60283b0, NoteHead::Group::HEAD_GROUPS was equal to the size of the heads array.
Great!
Fixed in branch 2.3.2, commit 96f0153526
Fix #274204: Regression: Ambitus causes a crash just while clicking on it
Fixed in branch 2.3.2, commit b027a16365
Merge pull request #3825 from mattmcclinch/274204-ambitus
fix #274204: Regression: Ambitus causes a crash just while clicking on it
Automatically closed -- issue fixed for 2 weeks with no activity.