-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
From microbit-foundation/python-editor-v3#1127
This reproduction counts to 1997 and then crashes with
Uncaught RuntimeError: Aborted(RuntimeError: unreachable executed). "unreachable" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)
abort https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1013
runAndAbortIfError https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1864
maybeStopUnwind https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1971
x https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1941
doRewind https://python-simulator.usermbit.org/v/0.1/build/firmware.js:2015
handleSleep https://python-simulator.usermbit.org/v/0.1/build/firmware.js:2048
callUserCallback https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1431
createModule https://python-simulator.usermbit.org/v/0.1/build/firmware.js:1451
You can see the crash in the editor or the sim demo page.
If you you allocate more/bigger lists in c() then it fails after fewer iterations.
It also fails if you replace the list with bytearray().
It works if you reduce the level of nesting (e.g. call c() directly in a).
def a():
i = 0
while True:
print(i)
i += 1
b()
def b():
c()
def c():
[]
a()
Not sure whether it's really an asyncify-related problem or a leak manifesting like that.
I've not yet tried the suggestion in the error of increasing the stack size.
Metadata
Metadata
Assignees
Labels
No labels