Ok, so I am seeing a strange issue where I will randomly see my device reset.
I usually print out “done for now” before calling imp.wakeup().
But I am seeing randomly I just get where I would normally see my logs, then it reboots and starts up again
10/31/2012 12:26:57: Device booting
I have a try/catch around the code in question and it never gets caught. Is this just beta growing pains, or am I doing something horribly wrong (likely)?
Ok, so my exception handler wasn’t printout out properly:
exception caught: stack overflow, cannot resize stack while in a metamethod
Ok, so better question. Is there a better way to get context on where the error is occurring? That message is useless.
Running squirrel locally I get more details of errors:
AN ERROR HAS OCCURED [the index ‘foo’ does not exist]
*FUNCTION [timed_update()] PoolController.js line 
*FUNCTION [main()] PoolController.js line 
Release-9 has better error reporting (including line numbers).
If you’re getting the stack resize errors, read peter’s post here:
…particularly about how you should be creating objects in the root table.