I'm continuing to have issues with assertions. I now isolated it to a small fragment of code. It doesn't fail on pico. Any thoughts what may be causing it? The code is:
function MCP23008(i2c,rst, i2ca) {
if (rst) {
rst.write(0);
}
this.i2c = i2c;
this.i2ca = (i2ca===undefined) ? 32:32+i2ca;
this.wt = i2c.writeTo.bind(i2c, this.i2ca);
if (rst) {
this.rst=rst;
this.rst.write(1);
}
}
function foo1(a) { console.log("foo", a); }
dofoo1 = foo1.bind(null, 55);
dofoo1.call();
The assertion failure is: ASSERT FAILED AT src/jsvar.c:624
The stack trace is:
0x40282e59: jsvRef at /big/home/src/esp8266/Espruino/src/jsvar.c:624
0x402867ed: jsvCopy at /big/home/src/esp8266/Espruino/src/jsvar.c:2053
0x4028c733: jspeFunctionCall at /big/home/src/esp8266/Espruino/src/jsparse.c:618
0x402a566b: jswrap_function_apply_or_call at /big/home/src/esp8266/Espruino/src/jswrap_object.c:866
0x4028a182: jsnCallFunction at /big/home/src/esp8266/Espruino/src/jsnative.c:183
0x4028c6d4: jspeFunctionCall at /big/home/src/esp8266/Espruino/src/jsparse.c:576
0x4028d27a: jspeFactorFunctionCall at /big/home/src/esp8266/Espruino/src/jsparse.c:1155
0x4028d340: jspePostfixExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1422
0x4028d420: jspeUnaryExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1449
0x4028b600: jspeBinaryExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1576
0x4028b615: jspeConditionalExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1612
0x4028b62d: jspeAssignmentExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1676
0x4028bc04: jspeExpression at /big/home/src/esp8266/Espruino/src/jsparse.c:1683
0x4028c1b0: jspeStatement at /big/home/src/esp8266/Espruino/src/jsparse.c:2307
0x4028d6e8: jspeBlockOrStatement at /big/home/src/esp8266/Espruino/src/jsparse.c:1736
0x4028dcfa: jspParse at /big/home/src/esp8266/Espruino/src/jsparse.c:1745 (discriminator 1)
0x4028e154: jspEvaluateVar at /big/home/src/esp8266/Espruino/src/jsparse.c:2494
0x40291277: jsiHandleNewLine at /big/home/src/esp8266/Espruino/src/jsinteractive.c:1284
0x4029163b: jsiHandleChar at /big/home/src/esp8266/Espruino/src/jsinteractive.c:1447
0x402916a2: jsiHandleIOEventForConsole at /big/home/src/esp8266/Espruino/src/jsinteractive.c:1653 (discriminator 2)
0x4029173c: jsiIdle at /big/home/src/esp8266/Espruino/src/jsinteractive.c:1677
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 issues with assertions. I now isolated it to a small fragment of code. It doesn't fail on pico. Any thoughts what may be causing it? The code is:
The assertion failure is: ASSERT FAILED AT src/jsvar.c:624
The stack trace is:
"Help"...