Menu

#5476 programming error/segfault while omitting Fingering.stencil with fingeringOrientations set 'left

Started
None
countdown
2020-05-09
2019-02-08
No

https://codereview.appspot.com/567560043

Thomas Morley wrote :

the following code is problematic

{
  \set fingeringOrientations = #'(left)
  \override Fingering #'stencil = ##f
  <g'-2 c''-4 >  %% chord needs two elements to trigger the bug
}

Versions 2.12.3 up to 2.16.2 print correctly, without error

Versions 2.18.2 up to 2.19.82 print correctly, but return:
programming error: Infinity or NaN encountered

Current master does:
Segmentation fault (core dumped)

Discussion

  • Valentin Villenave

    And this is what gdb has to say:

    Box::is_empty (this=this@entry=0x0, a=a@entry=Y_AXIS) at /lilypond/flower/include/drul-array.hh:47
    47    T const &operator [] (Direction d) const
    

    I’m wondering if it isn’t another skyline problem; setting the Direction to up or down doesn’t segfault but setting it to a horizontal direction (either right or left) does.

    I thought this illegal stencil Box would be passed by the New_fingering_engraver, but of the two following snippets, only the first one triggers the bug:

    {
      \set strokeFingerOrientations = #'(right)
      \override StrokeFinger.stencil = ##f
      <g'-\rightHandFinger #2 c''-\rightHandFinger #4 >
    }
    
    {
      \set stringNumberOrientations = #'(right)
      \override StringNumber.stencil = ##f
      <g'\2 c''\4 >
    }
    

    A workaround it not set the stencil property to ##f but rather to #empty-stencil.

     
  • Valentin Villenave

    Fix #5476: segfault when Fingering stencil set to #f.

    https://codereview.appspot.com/567560043

     
  • Anonymous

    Anonymous - 2020-05-07
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +https://codereview.appspot.com/567560043
    +
     Thomas Morley wrote :
    
     the following code is problematic
    
    • assigned_to: Valentin Villenave
    • Needs: -->
    • Type: -->
     
  • Anonymous

    Anonymous - 2020-05-07

    Passes make, make check and a full make doc but the reg tests aren't good.

    See:

    https://cloud-u8zj2dc4b.yourownnet.eu/s/fD5Tjo2Frz3g9p5 (~1mb)

     
  • Anonymous

    Anonymous - 2020-05-07
    • Patch: new --> review
     
  • Valentin Villenave

    • Patch: review --> needs_work
     
  • Valentin Villenave

    Yowza. Not good indeed. Thanks for catching this James, I should’ve paid more attention!

     
  • Valentin Villenave

    Fix regtests (conditional should only apply to horizontal fingerings)

    https://codereview.appspot.com/567560043

     
  • Anonymous

    Anonymous - 2020-05-08

    Passes make, make check and a full make doc.

    Reg test diffs attached

     
  • Anonymous

    Anonymous - 2020-05-09
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2020-05-09

    Patch on countdown for May 11th