Closed UncleGrumpy closed 8 months ago
Here is idf.py monitor
output of the crash when gpio:stop()
is called:
...
Stopping GPIO driver <0.3.0>.
assert failed: tlsf_free tlsf.c:1119 (!block_is_free(block) && "block already marked as free")
Backtrace: 0x40081de2:0x3ffba5d0 0x4008c831:0x3ffba5f0 0x40094979:0x3ffba610 0x4009240e:0x3ffba730 0x400922b8:0x3ffba750 0x400826a2:0x3ffba770 0x400949a9:0x3ffba790 0x400e693e:0x3ffba7b0 0x40130c25:0x3ffba800 0x40130cc0:0x3ffba820 0x40130d46:0x3ffba840 0x400e9977:0x3ffba860 0x4010976d:0x3ffba910 0x400d9a5c:0x3ffba930 0x401d7d87:0x3ffba970 0x4008f321:0x3ffba9a0
0x40081de2: panic_abort at /home/winford/esp/esp-idf-v5.1/components/esp_system/panic.c:452
0x4008c831: esp_system_abort at /home/winford/esp/esp-idf-v5.1/components/esp_system/port/esp_system_chip.c:84
0x40094979: __assert_func at /home/winford/esp/esp-idf-v5.1/components/newlib/assert.c:81
0x4009240e: tlsf_free at /home/winford/esp/esp-idf-v5.1/components/heap/tlsf/tlsf.c:1119 (discriminator 1)
0x400922b8: multi_heap_free_impl at /home/winford/esp/esp-idf-v5.1/components/heap/multi_heap.c:231
0x400826a2: heap_caps_free at /home/winford/esp/esp-idf-v5.1/components/heap/heap_caps.c:388
0x400949a9: free at /home/winford/esp/esp-idf-v5.1/components/newlib/heap.c:39
0x400e693e: context_destroy at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/context.c:171
0x40130c25: scheduler_terminate at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.c:352
0x40130cc0: scheduler_run at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.c:262
0x40130d46: scheduler_wait at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/scheduler.c:86
0x400e9977: scheduler_entry_point at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h:2311
0x4010976d: context_execute_loop at /home/winford/github/UncleGrumpy/AtomVM/src/libAtomVM/opcodesswitch.h:1550
0x400d9a5c: app_main at /home/winford/github/UncleGrumpy/AtomVM/src/platforms/esp32/main/main.c:114
0x401d7d87: main_task at /home/winford/esp/esp-idf-v5.1/components/freertos/app_startup.c:208 (discriminator 13)
0x4008f321: vPortTaskWrapper at /home/winford/esp/esp-idf-v5.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162
ELF file SHA256: b0e41eca7508d65d
CPU halted.
I have deleted the
AtomVM/build
andAtomVM/src/platforms/esp32/build
directories and done a complete clean rebuild of the esp32 image several times. The following is the simplest way to reproduce the crash is:For some reason I have not had stack traces with the last several rebuild of the image either, but the output is similar to: