Beam across a system break can disappear

• Mar 1, 2019 - 11:52
Reported version
3.0
Priority
P1 - High
Type
Graphical (UI)
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

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

Comments

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 https://github.com/musescore/MuseScore/pull/4784. 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.

I cannot even introduce cross-system/cross-page "Beam middle"... And after I apply a cross-measure "Beam middle" and a system break to break the beam, the beams around the break (not only the cross-measure beam) can go weird (very similar to the case in #289933: Layout shift in measure at start of system) and a normal cross-system beam seems to exist in the former of the beam-connected systems. But after a save all beams go normal and the cross-system beam no longer exists.

Before breaking with a system break:
批注 2019-06-30 130056.png
After breaking but before saving: (in my case it's cross-page)
批注 2019-06-30 130143.png
After saving:
批注 2019-06-30 130217.png