I added a stack backtrace. It's not a real interpretation of the stack, it really just looks for addresses in the stack that are within code and then looks up the symbols, so there are spurious entries. The result is:
0x40209361: jsAssertFail at ??:?
0x4020d21f: jspeFactor at ??:?
0x40202e2c: jsvLockAgain at ??:?
0x40202e56: jsvLockAgainSafe at ??:?
0x4020c598: jspeFunctionCall at ??:?
0x40201190: jslSingleChar at jslex.c:?
0x40201b44: jslGetNextToken at ??:?
0x4020b6c1: jspeBinaryExpression at ??:?
0x4020d427: jspePostfixExpression at ??:?
0x40202024: jslMatch at ??:?
0x4020b6ec: jspeAssignmentExpression at ??:?
0x4020bcd4: jspeExpression at ??:?
0x4020d389: jspeFactorFunctionCall at ??:?
0x4020e355: jspExecuteFunction at ??:?
0x402055ea: jsvIsStringEqualOrStartsWith at ??:?
0x402044f9: jsvLock at ??:?
0x4021045c: jsiExecuteEventCallback at ??:?
...
The fact that this happens in an event callback makes sense to me. Dunno where to go from here though.
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 added a stack backtrace. It's not a real interpretation of the stack, it really just looks for addresses in the stack that are within code and then looks up the symbols, so there are spurious entries. The result is:
The fact that this happens in an event callback makes sense to me. Dunno where to go from here though.