[chuck-users] classed-ugen-array-limit, Re; NullPointerException

Kassen signal.automatique at gmail.com
Wed Jul 4 17:46:53 EDT 2007

At least some clarity; I nailed down my crash (after considerable amounts of
baffled looks and cursing).

This is refering to the latest version of the Mini as well as the latest,
greatest, ASIO enabled, version of pure ChucK, both on XP.

Let's first establish that while expensive if actually used, the following
is fine;
SndBuf array[110];


now considder this;
// I picked this 10 at random, for length 5 it'll crash too
Foo x[10];

class Foo
    // at length 10 it'll run but this will crash(!!??)
    SndBuf array[11];

So; we seem to be having a issue with maximal array sizes for arrays of
Ugens within classes. I tried but there is no issue with manually going;
class Foo
    SndBuf a;
    SndBuf b;
    SndBuf c;
etc, etc, etc
At least not up to and incuding 12 buffers after which I was bored with
defining them.

I'm 99% certain this also solves the "kilo-shred-crashing" issue I reported
a while ago.

This isn't likely to affect many people because we *are* talking about
exceptionally large amounts of Ugens but it's very hard to work around. One
solution is to simply spork functions that define the class instances
instead of defining them in a array (this works) but while this allows you
to conveniently define CPU clogging amounts of Ugens it doesnt enable you to
easily adress them after the functions were sporked so with the current
state of ChucK that gives you a whole lot of garbage.I also tried to see
wether this was just SndBuf but using Gain instead also crashes so I think
it's safe to asume all other Ugens will too.

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

More information about the chuck-users mailing list