[chuck-users] OSC function crashing Chuck?

Stefan Blixt stefan.blixt at gmail.com
Sun Nov 25 12:56:50 EST 2012


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.

Remove the '@' from "OscEvent @ oeGetProcessId" and it will probably work.
Compare with the example "OSC_recv.ck".

/Stefan


On Sun, Nov 25, 2012 at 4:38 PM, Simon Steptoe <simonsteptoe at yahoo.co.uk>wrote:

> 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 at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>



-- 
Release me, insect, or I will destroy the Cosmos!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20121125/26be6d4a/attachment.html>


More information about the chuck-users mailing list