bug-lilypond
[Top][All Lists]
Advanced

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

Core dump on system-initial grace note with proportional notation


From: Trevor Bača
Subject: Core dump on system-initial grace note with proportional notation
Date: Tue, 23 Aug 2016 14:24:40 -0500

Hi,

I've found a reproducible core dump related to grace music.

Here's a minimal example. Explanation appears after:

### BEGIN EXAMPLE 1 (CORE DUMP) ###

\version "2.19.46"

\new Score \with {
    \override SpacingSpanner.strict-grace-spacing = ##t
    \override SpacingSpanner.strict-note-spacing = ##t
    \override SpacingSpanner.uniform-stretching = ##t
    proportionalNotationDuration = #(ly:make-moment 1 32)
    tupletFullLength = ##t
    } <<
    \new Staff {
        c'1
        \break
        \grace {
            c'16
        }
        c'1
    }
    \new Staff {
        \times 2/3 {
            c'2
            c'2
            c'2
        }
        c'1
    }
>>

### END EXAMPLE 1 (CORE DUMP) ###

LilyPond output looks something like this, with no notation generated:

GNU LilyPond 2.19.46
Processing `illustration.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing
systems.../home/gub/NewGub/gub/target/darwin-x86/src/lilypond-git.sv.gnu.org--lilypond.git-release-unstable/flower/include/interval.hh:227:
failed assertion `!is_empty ()'

Details:

Four conditions must hold for the core dump to obtain:

1. proportional notation has to be turned on (as per the first four
settings in the score's with-block)

2. tupletFullLength must be set to true (as the last setting in the score's
with-block).

3. The grace music must appear at the start of a system (which explains the
\break included in the example).

4. The grace music must appear immediately before a tuplet **in another
voice**.

Although I don't know how the grace-handling parts of LilyPond's
time-keeping code are implemented, I remember there having been related
issues like this in the tracker over the years; in fact, IIRC it used to
not be possible for grace music to appear score-initially at all. Along
those lines, I think item #4 above probably offers a clue as to what's
getting out of alignment and possibly forcing execution to halt. The clue
is that *if* corresponding grace music appears in *both voices* then the
core dump doesn't happen. Here's an example:

### BEGIN EXAMPLE 2 ###

\version "2.19.46"

\new Score \with {
    \override SpacingSpanner.strict-grace-spacing = ##t
    \override SpacingSpanner.strict-note-spacing = ##t
    \override SpacingSpanner.uniform-stretching = ##t
    proportionalNotationDuration = #(ly:make-moment 1 32)
    tupletFullLength = ##t
    } <<
    \new Staff {
        c'1
        \break
        \grace {
            c'16
        }
        c'1
    }
    \new Staff {
        \times 2/3 {
            c'2
            c'2
            c'2
        }
        \grace {  % <== This line is new
            c'16  % <== This line is new
        }         % <== This line is new
        c'1
    }
>>

### END EXAMPLE 2 ###

Example 1 core dumps. But example 2 compiles just fine.

The only difference between example 1 and example 2 is that the grace music
in example 1 is "unbalanced" (meaning that the grace appears only in one
context) while the grace music in example 2 is "balanced" (meaning the
grace music appears in both contexts at the same time offset). This makes
me suspect that time-keeping gets off between the two simultaneous contexts
after the grace is interpreted in one voice (but not in the other).

Hope this report helps; a scan of the 4 or 5 pages in the tracker keyed to
"grace" didn't appear to contain this issue.

Trevor.

-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca


reply via email to

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