[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Re: Still occasional memory corruption...

On Nov 20, 2013 5:59 PM, "James Harkins" <jamshark70@xxxxxxxxx> wrote:
> My last ditch effort is to bump up stack sizes to some absurd amount, in the hopes that all I'm seeing is stack overflow.

No dice. I quadrupled the default stack size in Thread and I still get the same behavior.

What's weird is that the stack trace is very short. An osc message comes in, it evaluates a function which I added to Main (using addOSCRecvFunc), and the "add not understood" error comes at that point. The function itself relays the message to another function. It's very simple, doesn't use "add" at all.

Wait... here it is... the error happens in collectAs. My call stack shows that the "class" argument is Array, and one item is successfully added into the array. By the time it gets to the second iteration, somehow "res" has changed from an array to a TempoClock, despite the fact that res IS NEVER REASSIGNED in this method! That is, function.value(elem, i) has had a side effect in a scope to which that function has NO ACCESS.

We need to fix the SC virtual machine, or dump it. This is insane.