If you see an error message that can be useful to include in a post like this as well as well. Anyway, oeGetProcessId is probably null or some other void state when you try to reference it.
Whilst working on some OSC stuff, I got to a situation where Chuck
(and mini-Audicle) kept crashing at the end of the main shred.
I've stripped out all the Ugens and synthesis stuff and am left with
the following algorithm (see below) as the culprit. At the end of the
5 seconds duration of the main shred, Chuck crashes. Take out
"oeGetProcessId => now;" and all is fine.
Now aside from whether it's a viable/good piece of code or not, I was
surprised that it goes so far as to crash the system.
Is it a bug... or is it me? (Code below).
Simon Steptoe
//CODE ==============================================
OscRecv RecvProcess;
32000 => RecvProcess.port;
RecvProcess.listen();
RecvProcess.event("/process/id, i " ) @=> OscEvent @ oeGetProcessId;
Shred oscProcess;
spork ~ oscProcessingIt() @=> oscProcess;
5::second => now;
fun int oscProcessingIt()
{
int testValue;
while (true)
{
oeGetProcessId => now;
if( oeGetProcessId.nextMsg() != 0)
{
oeGetProcessId.getInt() => testValue;
<<<"Hello from PROCESSING: ",testValue>>>;
}
0.1::second => now;
}
}
//============================================
Thanks
Simon Steptoe
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users