bug-lilypond
[Top][All Lists]
Advanced

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

Re: Crash on bad_alloc


From: Carl Sorensen
Subject: Re: Crash on bad_alloc
Date: Sun, 27 Jun 2010 08:13:49 -0600



On 6/26/10 10:36 AM, "Phil Holmes" <address@hidden> wrote:

>> "Carl Sorensen" <address@hidden> wrote in message
>> news:address@hidden
>> 
>> 
>> 
>> On 6/26/10 4:38 AM, "Phil Holmes" <address@hidden> wrote:
>> 
>>> "Ben Englert" <address@hidden> wrote in message
>>>> 
>>>> File follows:
>>>> 
>>>> \version "2.13.21"
>>>> 
>>>> PartPOneVoiceSix =  \relative bes {
>>>> r4 a'4 ( -. -1 d,4 -. -2 a4 -. -1 s1 s1 \break s1 s1 s1 |
>>>> <f a>2 <g, d'>2 ~ ~ \pageBreak s1 s1 s1 \clef "treble" s1 s1 \clef
>>>> "bass" s1 \break |
>>>> bes2. e,4 ) -3 \bar "||"
>>>> }
>>>> 
>>>> % The score definition
>>>> \new PianoStaff <<
>>>>    \context Staff = "1" <<
>>>>>> \context Staff = "2" <<
>>>>         \context Voice = "PartPOneVoiceSix" { \voiceTwo
>>>> \PartPOneVoiceSix }
>>>>>> 
>>>>>> 
>>> 
>>> 
>>> Thanks.  Added as http://code.google.com/p/lilypond/issues/detail?id=1156
>> 
>> Is this a Tiny Example?  The first part of the job of fixing this will be
>> trying to see what in this score causes the problem.  And the score doesn't
>> seem particularly simple.
>> 
>> It seems possible to me that the chord with consecutive ties before a page
>> break with no chord after it might be the source of the problem.   Trying
>> to
>> eliminate all of the articulations and markups to see if the problem still
>> exists would be a good thing to do, and can be done by the original author
>> of the file.
>> 
>> See:
>> 
>> http://lilypond.org/website/tiny-examples.html
>> 
>> Thanks,
>> 
>> Carl
> 
> Carl,
> 
> I took a view it was likely to be as tiny as produced the problem, since
> it's a fairly unusual looking output, and that anything that crashes Lily
> was worth being aware of.
> 
> I'll ask the OP if he can make it smaller.
> 
> --
> Phil Holmes
> Bug Squad
> 
On 6/26/10 8:17 PM, "Ben Englert" <address@hidden> wrote:

>> I'm not top posting
> Phil is correct in that these lines were culled from a much larger file with
> trial-and-error. However, I've done another pass evaluating what
> elements can be removed from each linewhile still reproducing the
> behavior. Here is a new version of the file that, as far as I
> can determine experimentally, is as minimal as can
> be - i.e. I can remove no more elements without also removing
> the crash behavior.
> 
> 
> \version "2.13.21"
> 
> PartPOneVoiceSix =  \relative bes {
>  r4 a'4 ( d,4 a4 |
>  <f a>2 <g, d'>2 \pageBreak s1 \break |
>  e,4  ) 
> }
> 
> % The score definition
> \new PianoStaff <<
>     \context Staff = "1" <<
>>> \context Staff = "2" <<
>          \context Voice = "PartPOneVoiceSix" { \voiceTwo \PartPOneVoiceSix }
>>> 
>>> 


I'm not complaining about the work that was done.  Ben, I appreciate your
work to simplify the file.  You made my job much easier, because I had less
to wade through.  

But for the record, this is still not a true tiny example.

The chords don't need to be there to cause the problem.

The pageBreak can be replaced with a \break.

The slur does need to be there.

The problem is caused when we have a slur continuing across a line that
contains only a spacer rest.  So the new tiny example is:

\version "2.13.21"

\relative c' {
 f2 f2(  \break  
 s1
 %c1   %%% uncomment this line and allocation fault goes away
 \break |
 e,4)   
}


The nice thing about getting to a truly tiny example is that it helps to
focus on the real issue.  In this case, I asked myself "what is unusual
about this music that causes abnormal behavior?" and then tried changing
whatever I could find.

The skill to do that kind of work is worth building, because it will help
time and again when LilyPond isn't doing what you want it to.

Also, once you can identify the culprit, you may be able to figure out a
workaround.

Ben, thanks for the report.  Phil, thanks for making the issue.  Ben, thanks
for making the file simpler.

Carl




reply via email to

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