[chuck-users] Array out of bounds.... error usability

Robert Poor rdpoor at gmail.com
Thu May 7 22:05:28 EDT 2009


I've gotten a little mileage from launching ChucK under gdb:
   % gdb chuck
then running it
   * r
...then when it bombs out, type "bt" for backtrace.  Sometimes you can  
guess what's gone on by looking at the names of the functions on the  
stack.  I've not taken the time to compile the system with a -g flag,  
which would allow me to see the actual source code where it bombed.   
(But note: the line number where it bombed will be in the ChucK code,  
not in your .ck file.)

- Rob

On 7 May 2009, at 18:31, Tom Lieber wrote:

> 2009/5/7 Kassen <signal.automatique at gmail.com>:
>> Let's have a look at this;
>> ArrayOutOfBounds: in shred[id=2:tr8or.ck], PC=[3565], index=[4]
>> Ok, so it's a array that gets defined in my main shred and it's one  
>> that's 4
>> or less elements in size. That narrows it down considerably but  
>> we're not
>> there yet. Now, I have the feeling that ChucK is trying to tell me  
>> something
>> with the "PC=[3565]" but that bit is quite useless to me as I have  
>> no idea
>> what it means.
>> Questions; What does the PC bit mean? How is it useful? Can we  
>> consider ways
>> of making it more useful?
> I *think* it's "program counter," the number of the bytecode
> instruction where the exception occurred. A line number would be
> nicer, huh? :D
> -- 
> Tom Lieber
> http://AllTom.com/
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

More information about the chuck-users mailing list