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@lists.cs.princeton.edu wrote:

From: Ge Wang <gewang@CS.Princeton.EDU>
Date: 13 July 2006 17:36:16 BDT
To: ChucK Users Mailing List <chuck-users@lists.cs.princeton.edu>
Subject: Re: [chuck-users] Object array initialization
Reply-To: ChucK Users Mailing List <chuck-users@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@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users