Aaron Hill <lilyp...@hillvisions.com> writes:

> I think I have narrowed down the source of the problem.
>
> From stem-tremolo.cc:175-177:
>
>>  Interval ph = stem->pure_y_extent (stem, 0, INT_MAX);
>>  Stem_info si = Stem::get_stem_info (stem);
>>  ph[-dir] = si.shortest_y_;
>
> There is an implicit assumption that si.shortest_y_ will always be
> within the interval ph.  Otherwise, the final line will produce an
> inverted interval.  And later on in the function, the !is_empty
> assertion will fail when ph.center() is called.

Good analysis.

Tracker issue: 5501 (https://sourceforge.net/p/testlilyissues/issues/5501/)
Rietveld issue: 572550043 (https://codereview.appspot.com/572550043)
Issue description:
  Avoid failed assertion in stem tremolo code  Example code triggering
  the problem:      \relative { a32 8..:32 }

> Of course, this is not to say that Stem::calc_stem_info is definitely
> in the wrong, but its output is not always what
> Stem_tremolo::pure_height would seem to expect.

This avoids the interval shrinking to void empty by not shrinking the
interval, ever.  I am not sure this is the right fix.  Is the interval
intended to shrink?

-- 
David Kastrup

_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to