[chuck-users] Object array initialization

eduard aylon eduard.aylon at gmail.com
Sat Jul 15 14:44:06 EDT 2006


Hi Olie,

I did reported something similar some time ago, but got no reply...
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-June/ 
000609.html

Eduard


On Jul 15, 2006, at 7:43 PM, Ollie Glass wrote:

> Hi Ge,
>
> your example works on my system too (OS X 10.4.7 PPC, ChucK  
> 1.2.0.5b). After some hacking I found the bus error stopped when I  
> changed "int rootNote, mainPitch;" to "int rootNote; int  
> mainPitch;". I don't know why, and strangely this test works:
>
> int x, y;
> 0 => x;
> 4 => y;
>
> <<< x >>>;
> <<< y >>>;
>
> If you'd like to recreate the error the offending variables are on  
> lines 459 & 460 in the script at blackholeprojector.com/Sequencer.ck
>
> Ollie
>
> On 14 Jul 2006, at 17:00, chuck-users- 
> request at lists.cs.princeton.edu wrote:
>
>> From: Ge Wang <gewang at CS.Princeton.EDU>
>> Date: 13 July 2006 17:36:16 BDT
>> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
>> Subject: Re: [chuck-users] Object array initialization
>> Reply-To: ChucK Users Mailing List <chuck- 
>> users at lists.cs.princeton.edu>
>>
>>
>> Hi Ollie!
>>
>> Which platform are you running?  Also, can you include the
>> greater program, or more of the context?  I can't seem to
>> reproduce the crash on OS X using the following code:
>>
>> ---
>>
>> public class X
>> {
>>     int hi;
>>     fun void boo()
>>     {  <<< hi >>>; }
>> }
>>
>> class Y
>> {
>>     X xs[];
>>     init( 4 );
>>
>>     fun void init( int num )
>>     {
>>         X x[num] @=> xs;
>>
>>         for( int i; i < num; i++ )
>>             i => xs[i].hi;
>>     }
>> }
>>
>> // make y
>> Y y;
>>
>> // print
>> for( int i; i < y.xs.cap(); i++ )
>>     y.xs[i].boo();
>>
>> ---
>>
>> It may be a chuck bug elsewhere...
>>
>> Best,
>> Ge!
>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20060715/e7db970a/attachment-0001.htm 


More information about the chuck-users mailing list