MicroPython_ESP32_psRAM_LoBo icon indicating copy to clipboard operation
MicroPython_ESP32_psRAM_LoBo copied to clipboard

LoadStoreError in mp_decode_uint_skip

Open averes-avidid opened this issue 6 years ago • 0 comments

Error Log

>>> 0x402691d3: mp_decode_uint_skip at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/bc.c:68 (discriminator 1)

Guru Meditation Error: Core  1 panic'ed (LoadStoreError). Exception was unhandled.
Core 1 register dump:
PC      : 0x402691d3  PS      : 0x00060d30  A0      : 0x800feb1b  A1      : 0x3ffedf10  
A2      : 0x400f94dd  A3      : 0x3f81c480  A4      : 0x3f41835c  A5      : 0x3f418964  
0x400f94dd: uni_print at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objstrunicode.c:86

A6      : 0x3f418964  A7      : 0x3ffedf20  A8      : 0x400f94dc  A9      : 0x3ffedeb0  
0x400f94dc: uni_print at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objstrunicode.c:86

A10     : 0x00000000  A11     : 0x3ffec064  A12     : 0x00000004  A13     : 0x3f8a86ac  
A14     : 0x3f811a70  A15     : 0x00000000  SAR     : 0x00000013  EXCCAUSE: 0x00000003  
EXCVADDR: 0x400f94dc  LBEG    : 0x4009e268  LEND    : 0x4009e296  LCOUNT  : 0xffffffff  
0x400f94dc: uni_print at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objstrunicode.c:86

0x4009e268: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:168

0x4009e296: memcpy at /home/jeroen/esp8266/esp32/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/memcpy.S:201


Backtrace: 0x402691d3:0x3ffedf10 0x400feb18:0x3ffedf30 0x400f58f0:0x3ffedfd0 0x400f1231:0x3ffee000 0x400f3da0:0x3ffee020 0x400f3dbd:0x3ffee070 0x400f1231:0x3ffee090 0x400fcecc:0x3ffee0b0 0x400da019:0x3ffee150
0x402691d3: mp_decode_uint_skip at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/bc.c:68 (discriminator 1)

0x400feb18: mp_execute_bytecode at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/vm.c:1400

0x400f58f0: fun_bc_call at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objfun.c:283

0x400f1231: mp_call_function_n_kw at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/runtime.c:601

0x400f3da0: mp_call_method_self_n_kw at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objboundmeth.c:70

0x400f3dbd: bound_meth_call at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/objboundmeth.c:83

0x400f1231: mp_call_function_n_kw at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/runtime.c:601

0x400fcecc: thread_entry at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/py/modthread.c:121

0x400da019: freertos_entry at /home/averes/projects/esp32-logger/micropython-loboris/MicroPython_BUILD/components/micropython/esp32/mpthreadport.c:612


CPU halted.

According to https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/fatal-errors.html

LoadStoreError Application has attempted to do a 8- or 16- bit load/store from a memory region which only supports 32-bit loads/stores. For example, dereferencing a char* pointer which points into intruction memory will result in such an error.

Here is the code and comments for mp_decode_uint_skip (bc.c lines 65-71).

// This function is used to help reduce stack usage at the caller, for the case when
// the caller doesn't need the actual value and just wants to skip over it.
const byte *mp_decode_uint_skip(const byte *ptr) {
    while ((*ptr++) & 0x80) {
    }
    return ptr;
}

This sometimes occurs when trying to connect to the esp32 via WiFi.

averes-avidid avatar Mar 27 '19 17:03 averes-avidid