mac hangs when using max with arduino board

lfanele's icon

hi everybody,
i just got my arduino board. i'm really happy with it because it works really well and is easy to use for someone who has no clue about phys. comp. (like me).
but one thing that really scares me is that my computer gets really bad freezes when using my board with max/msp.
i have simple test setup where i measure the light intensity with a photo-resistor. in max i use the serial object to get the data inside the computer and then use this data to drive a sine-oscillator. in the beginning it seems to work fine but sometimes, like when editing the patch or using some max-ui elements the computer doesn't react anymore: i can't use the mouse or the keyboard, but no error message or 'reboot screen' appear and for example iTunes keeps on playing...
really strange stuff and all i can do is shut down my computer by holding down the powerbutton. i'm on powerbook g4 ppc 1.67 Ghz, 1.5 gb ram, mac os 10.4.7, arduino 04 and max/msp 4.5.7.

maybe someone has an idea what could be wrong?
thanks a lot,
stephen

p.s: while using max/msp i always close the arduino-app so there should be no interference

// this is my max code

Max Patch
Copy patch and select New From Clipboard in Max.

// this is the arduino code:

int analogInput = 3;
int value = 0;

void setup(){
// declaration of pin modes
pinMode(analogInput, INPUT);
// begin sending over serial port
Serial.begin(9600);
}

void loop(){
// read the value on analog input
value = analogRead(analogInput);

// print out value over the serial port
Serial.println(value);
delay(20);    
}