Comment #20 on issue 2990 by [email protected]: \RemoveEmptyStaves in StaffGroup context crashes
http://code.google.com/p/lilypond/issues/detail?id=2990

I've now moved the programming error out of production code.

Here are three other segfaults my patch fixes. I'd be interested to know if they exist in 2.16 and 2.14.

{
  \override NoteColumn #'before-line-breaking =
  #(lambda (grob)
    (ly:pointer-group-interface::add-grob grob 'elements grob))
  a4
}

{
  \override DynamicLineSpanner #'after-line-breaking =
  #(lambda (grob)
    (ly:pointer-group-interface::add-grob grob 'elements grob))
  a4\f\< a\!
}

{
  \override Staff.DotColumn #'before-line-breaking =
  #(lambda (grob)
    (ly:pointer-group-interface::add-grob grob 'elements grob))
  <a c>4.
}

If I'm understanding you correctly, you are advocating making checks in all functions that recurse through elements lists in order to prevent these segfaults. I am advocating doing this only once - at the moment where the element is added to the grob array.


Reply via email to