Incorrect bar line with voltas, \repeatTie and lyrics

"Ole V. Villumsen via bug-lilypond" <[email protected]> Sat, 30 Nov 2024 15:09:34 +0000
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <_wTYqbxOJIq3Amlvcfyaty02PB49sp-2S-JjmxhXddGr_HHNfR1uvSYbHzMXx5GlpWv7i5t3Lelm0FRNkWBIpRmZIAy0ESRX7Y9QaNfWXz0=@protonmail.ch>
If I leave out the lyrics from the example below, Lilypond sets the notes nicely reporting no errors or warnings. When I include the lyrics, Lilypond counts the measure in the second volta wrong. One, it now reports:

7-8.ly:11:40: warning: barcheck failed at: 7/8
            \volta 2 { g2\repeatTie e2
                                        | }

Two, it now incorrectly sets a bar line between the two notes in the second volta, close to the first note, and no bar line at the end of the piece. I suspect that the bar line is set 1/8 into the second volta. This seems to agree with its position and with the warning message.

I expect that one can work around it (which I haven’t attempted yet).

\version "2.24.4"
\score {
  <<
    \new Voice = "one" {
      \relative {
        \repeat volta 2 {
          g'1 ~ |
          \alternative {
            \volta 1 { g2 r4. g8 | }
            \volta 2 { g2\repeatTie e2 | }
          }
        }
      }
    }
    \addlyrics {
      \repeat volta 2 {
        Ah,
        \alternative {
          \volta 1 { ah, }
          \volta 2 { _ oh. }
        }
      }
    }
  >>
}

Sent with Proton Mail secure email.