lilypond-devel
[Top][All Lists]
Advanced

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

Re: Debugging help on lilypond


From: Carl Sorensen
Subject: Re: Debugging help on lilypond
Date: Sat, 12 Dec 2009 22:27:50 -0700



On 12/12/09 2:27 PM, "Joe Neeman" <address@hidden> wrote:

> On Sat, 2009-12-12 at 14:15 -0700, Carl Sorensen wrote:
>> So I've finally gotten to a point where I think I know what to do with the
>> autobeaming code to make it work properly in 4/4 time with a 1/16 note in
>> the second beat.
>> 
>> I've written code to try to fix it.  The code seems to execute properly
>> through my changes, but then it gets into a problem, and I get this error
>> message:
>> 
>> terminate called after throwing an instance of 'std::out_of_range'
>>   what():  vector::_M_range_check
>> Abort trap
>> 
>> 
>> So I try running it in gdb, and I get the same error.
> 
> At this point, you should be able to type "bt" to get a backtrace. You
> can move up and down through the frames by typing "up" and "down" or you
> can jump to the 23rd frame with "fr 23". Once you are in a frame, you
> can examine all of the local variables. The first few frames will
> probably be non-lilypond code, so you'll want to ignore them.


Thanks, Joe.  This really helped.

Now I have another problem.  I have something that seems impossible to me.

Here's part of the backtrace:

#4  0x000387f2 in Beaming_pattern::beamlet_count (this=0xa026a9c4,
i=-1608078908, d=DOWN) at beaming-pattern.cc:245
#5  0x0002f565 in Beam::set_beaming (me=0x3615ce0, beaming=0x3616cd0) at
beam.cc:1341


Here's some info from frame 5:
#5  0x0002f565 in Beam::set_beaming (me=0x3615ce0, beaming=0x3616cd0) at
beam.cc:1341
1341              int count = beaming->beamlet_count (i, d);
(gdb) p beaming
$4 = (const Beaming_pattern *) 0x3616cd0
(gdb) p i
$5 = 1
(gdb) p d
$6 = 56712592
(gdb) p LEFT
$7 = DOWN

And here's some info from frame 4:
(gdb) down
#4  0x000387f2 in Beaming_pattern::beamlet_count (this=0xa026a9c4,
i=-1608078908, d=DOWN) at beaming-pattern.cc:245
245      return infos_.at (i).beam_count_drul_[d];
(gdb) 


Here's my question:  How can beaming be 0x3616cd0, i be 1, and d be 56712592
in the calling routine, but then

this is 0xa026a9c4, i is -1608078908, and d be DOWN in the called routine?

This seems impossible to me.  Any thoughts on how I might figure this out?

Thanks,

Carl





reply via email to

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