[MU4 Issue] Crash when notes above/below the staff are set to invisible
Describe the bug When a notes above/below the staff is set to invisible, musescore crashes instantly. It happens when a note requires additional lines.
- treble clef : low c and below, high a and above
- bass clef : low e and below, "high" c and above
To Reproduce Steps to reproduce the behavior:
- New score (ie treble clef template, but works with anything)
- input a low c
- set it to invisible
- CRASH
Expected behavior No crash :)
Platform information
- OS: [macOS]
- musescore 4.0.1
Additional context Specially vicious when using the "toggle rhythmic slashes" option, since notes are below the staff
Workaround
- change note pitch to bring the note inside the staff
- set to invisible
- change pitch back
Is like #15355, but more precise.
Couldn't reproduce this myself, but this visibility crash seems to be a very sneaky issue that manifests some times and not others.
I can't reproduce either, but if you have a specific score that does this reliably, please ZIP and attach it and tell us which note specifically is crashing for you.
I tried on another computer (mac), with a fresh musescore 4.0.1 install. Everything as default (on mac) The score is literally the treble clef template, with a low c whole note on measure 1. When I set the low C to invisible, musescore crashes every time. maybe I can check some logs.
Which "low c"? I tried a bunch of different octaves. It really would help to attach your score, as there are any number of variables that are difficult to account for (eg, different language settings, different default page sizes, different default sounds). none of these should be relevant but then, it shoudln't crash either, and doesn't for me. If your steps allowed me to reproduce the problem, I wouldn't be asking, but so far my attempts have no succeeded. So we'd need an actual score in order, if for no other reason than to rule out those variables.
Also be sure to say exactly how you're making it invisible. After clicking the notehead, I tried both pressing "V" and using the toggle in the Inspector.
my logs (note the --factory-settings option) :
21:39:09.461 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note
[30387:764583:20230117,213919.943128:WARNING crash_report_exception_handler.cc:240] UniversalExceptionRaise: (os/kern) failure (5)
[1] 30385 segmentation fault mscore --debug --factory-settings
If that's any help, here my "score"
crash-when-set-to-invisible.mscz.zip

Did some more tests: when I hit "v" after selecting the notehead, it DOES NOT crash. only when I untick the "visible" checkbox in "properties. I updated the bug report.
Aha, thanks for the additional info - now I can get this score to crash, using the following steps:
- new score, treble staff
- enter a whole note middle C into the first measure
- select the entire measure (not just the note)
- uncheck "Visible" in the Properties panel
So far I can only get it to crash if the note is the first note of the piece. I suspect it relates somehow to the system header also being present in the measure.
Thanks for your answer ! I do get this crash by selecting only one the note, I don't need the whole measure selected. And any note in the score causes this crash. Initially I experimented this a lot on a large score, but it's been corrupted, so I started from scratch.
Interesting. Well, that's the only way I was able to get it to crash, but maybe it was a fluke.
Retested on Win10/Mac12