Beam across a system break can disappear

• Mar 1, 2019 - 11:52
Reported version
P1 - High
Graphical (UI)
S3 - Major

In V3.0.4, the fix for the #280050: Beam Middle not working across barlines problem gives a major improvement for the long standing #16278: Beaming notes over barlines and line breaks problem BUT there is a display / export issue. With the attached score (in Page View), enter a note in the first empty bar and the beam across the previous line break disappears.
Test beam.png
The fault may correct itself on saving / moving the window and other operations, or it may not, but it is not very persistent. However, exporting a pdf while the fault is displayed, will export the faulty score.

Although breaking the beam at the line break is MUCH better than having fragments of beam wandering over the page, this is, however, not a real fix for #16278: Beaming notes over barlines and line breaks.

Attachment Size
Test beam.mscz 8.43 KB
Test beam.png 36.89 KB
Test beam.pdf 14.6 KB


By my understanding, that older issue is now considered to be about getting it to actually work in the sense of showing broken beams on either side. This current issue is about the issue with beam that does get displayed sometimes disappearing.

I can still reproduce in 3.0.5 as well as master, using the exact instructions shown (entering a C into the first empty measure). But it is very odd, the beam isn't there at first, then later it's back, saving helps but not always. When it's not there, I can't select it either, so it seems to be a true layout issue and not just a drawing issue.

FWIW, this whole issue of exactly when we layout beams is hugely problematic, and we probably need to step back a bit and rethink a few things. See also It's the fact that we don't do beam layout until too late that is getting in the way of what would be an excellent layout improvement that was actually one of the first things implemented for 3.0 way back when. We need to delay some aspect beam layout to have any chance of beaming across barlines or systems to work, but somehow we need to do better.

In reply to by Jojo-Schmitz

Jojo-Schmitz asked "Why isn't this a duplicate of #16278: Beaming notes over barlines and line breaks?"
My reasoning was that the behavior in V3.0.4 / V3.0.5 is much better than that reported in #16278: Beaming notes over barlines and line breaks in that the note lengths are now right and there are no odd fragments of beams, but a new oddity has appeared that may or may not be related to the original problem - so, potentially, a new issue has arisen that may be easier to fix, may not be related, and for which it is possible to work around - changing the stave space and changing it back seems to cure all occurrences at once.

Title Beam across a line break can dissapear Beam across a line break can disappear

Fixed typo in the issue title.

I think I understand why this is happening. We are trying to be clever and only lay out the system that has changed, but since the beam actually starts on the previous system, we don't end up laying it out again. It's all pretty convoluted, I think maybe the beam layout gets invalidated in Score::createBeams() or breakCrossMeasureBeams(). I note the problem doesn't occur if there is a line break on the previous system.