How do I trace error?

Actually ignore. found the silly error

So the stack trace (which would be better in backticks) is saying that somewhere in the code this has happened.

nil[  some_array_with_one_item  ]

This corresponds to these lines…

    arg this = nil
    arg selector = ‘at’ // this is the '[]' call.
    arg args = [*1]  // some array with one item.

This happens after all the variables in the OSCDef have been assigned values…

arg msg = [*16]
arg time = 30839.315582939
var elapsed = 13.350447484001
var chroma = [*12]
var phi = [*6]
var mean = 0.91631761539265
var stdev = 0.89222357268149
var localD = 4.4530706161982
var pnt2pnt = 0.053288430798827
var level = 0.017177091911435

As you can see, none of these are nil.
So what has mostly likely happened is that some other part of the code has set one of the variables not declared inside the OSCdef to nil.

Its not likely that anyone is going to spend the time reading all the code you posted because it is (at least for me) too complex to understand.

There is a lovely Brian Kernighan quote that comes to mind…

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

For future reference, I think args = [*1] means there’s one argument – the collection of arguments is a single element array (i.e. a single argument), not that the argument itself is an array. If the call were, 0) then it would show args = [*2].


This post might be going a bit far afield? The OP already withdrew the question, so effectively this topic is over. I was only clarifying a detail of one comment.

I’d suggest a new thread perhaps, for discussion of odd interpreter edge cases.


1 Like

Ok, thank’s for the suggestion, check the other post later if you please))))