I'm continuing to have assertion failures. A different JS program now hits assert(jsvGetLocks(var) < JSV_LOCK_MAX) in jsvLockAgain. I added code to call jsvGetPathTo before the assertion hits and in that function it hits the same assertion in jsvLock. Most likely jsvGetPathTo tries to lock the same var as it traverses the hierarchy. Is there any other way to get information about which variable this is and/or where in the JS code this is being encountered? Is there a way to print the JS callstack?
Update: I added a decrement of the lock before calling jsvGetPathTo so it doesn't hit the assertion failure. Now it prints: ▒.HttpCC["0"]. After some poking around, I conclude that that's my MQTT client connection.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm continuing to have assertion failures. A different JS program now hits
assert(jsvGetLocks(var) < JSV_LOCK_MAX)
in jsvLockAgain. I added code to calljsvGetPathTo
before the assertion hits and in that function it hits the same assertion in jsvLock. Most likely jsvGetPathTo tries to lock the same var as it traverses the hierarchy. Is there any other way to get information about which variable this is and/or where in the JS code this is being encountered? Is there a way to print the JS callstack?Update: I added a decrement of the lock before calling jsvGetPathTo so it doesn't hit the assertion failure. Now it prints:
▒.HttpCC["0"]
. After some poking around, I conclude that that's my MQTT client connection.