bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failing !is_empty assertion and tremolos


From: David Kastrup
Subject: Re: Failing !is_empty assertion and tremolos
Date: Tue, 26 Mar 2019 00:14:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Aaron Hill <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]