Menu

#5501 Avoid failed assertion in stem tremolo code

Fixed
Enhancement
2019-04-15
2019-03-25
No

Avoid failed assertion in stem tremolo code

Example code triggering the problem:

\relative { a32 8..:32 }

http://codereview.appspot.com/572550043

Discussion

  • Anonymous

    Anonymous - 2019-03-26

    Passes make, make check and a full make doc.

    Reg test diff attached

     
    • David Kastrup

      David Kastrup - 2019-03-26

      Ok, so it causes a difference even in code that did not fail. I cannot really see just what kind of difference and whether it would be relevant, namely either desirable or undesirable, or of little practical relevance.

       
  • Anonymous

    Anonymous - 2019-03-26
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2019-03-27
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2019-03-27

    Patch on countdown for March 30th

     
  • Valentin Villenave

    Hi David,
    could the regtest diff only be due to a different rounded value?
    Also, I noticed that the same code that you fixed is also found in Stem_tremolo::calc_y_offset (but I haven’t found a way to trigger the crash with that), are we sure that it wouldn’t need to be rewritten into add_point as well?

    The same failed assertion (or something very similar) is found in [#3374] and possibly in [#5281].

     

    Related

    Issues: #3374
    Issues: #5281

    • David Kastrup

      David Kastrup - 2019-03-28

      could the regtest diff only be due to a different rounded value?
      That's unlikely. The change is invasive in that it not only triggers in cases that threw an assertion failure previously: it does not replace a lower bound but adds a point to an interval: that's only equivalent to the previous behavior if the replacement would not have shrunk the interval. I proposed it based on the handwaving guess that it would kick only in in sort-of pathological cases.

      The problem now is that the regtest triggering shows that this change is not equivalent even in cases that are basic enough to be included in the regtests but did not previously trigger the problem: namely they shrink the interval but not to a degree of making it empty.

      Since I was proposing this fix basically flying blindly, I don't know whether the change in behavior for cases that worked previously is likely a change to the better or worse. Extending the nature of the fix to other locations would similarly warrant making this decision.

      So someone who has a clue what this code is actually likely to be doing (Keith?) should pitch in before we extend it to other areas. Likely even before we even commit in the current state.

       
  • David Kastrup

    David Kastrup - 2019-03-28
    • Patch: countdown --> review
     
  • Anonymous

    Anonymous - 2019-03-30

    I'll leave on Review - David but f you want to, you can put this on countdown (for April 2nd)

     
  • Anonymous

    Anonymous - 2019-04-02
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2019-04-02

    Patch on countdown for April 5th

     
  • David Kastrup

    David Kastrup - 2019-04-03
    • Patch: countdown --> needs_work
    • Type: Enhancement --> Crash
     
  • David Kastrup

    David Kastrup - 2019-04-03

    Keith has relevant comments on the review that I need to address.

     
  • Anonymous

    Anonymous - 2019-04-08
    • Needs: -->
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2019-04-08

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2019-04-12
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2019-04-12

    Patch on countdown for April 15th.

     
  • Anonymous

    Anonymous - 2019-04-15
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2019-04-15

    Patch counted down, please push to staging.

     
  • Anonymous

    Anonymous - 2019-04-15
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Anonymous

    Anonymous - 2019-04-15
    Issue 5501: Avoid failed assertion in stem tremolo code master
    author  David Kastrup <dak@gnu.org> 
        Tue, 26 Mar 2019 00:02:52 +0100 (00:02 +0100)
    committer   David Kastrup <dak@gnu.org> 
        Mon, 15 Apr 2019 19:32:56 +0100 (20:32 +0200)
    commit  9d9dc557290e071a603c10a194ac4f5923bf0ce0
    
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.