← index #8294Issue #16144
Related · high · value 5.306
QUERY · ISSUE

ESP32 Generic: ESP-IDF v4.4 throws exception allocation errors (`MemoryError: memory allocation failed`)

openby RonnyLVopened 2022-02-11updated 2022-02-15
port-esp32

Building ESP-32 GENERIC board using ESP-IDF v4.4 (142bb32c50fa9875b8b69fa539a2d59559460d72) throws memory allocation errors upon py file imports:

Traceback (most recent call last):
  File "main.py", line 62, in <module>
  File "uasyncio/core.py", line 1, in run
  File "uasyncio/core.py", line 1, in run_until_complete
  File "uasyncio/core.py", line 1, in run_until_complete
  File "main.py", line 38, in setup
  File "./sargs.py", line 70, in setup
  File "./sargs.py", line 80, in _init_lcd
  File "./ssd1306.py", line 113, in __init__
MemoryError: memory allocation failed, allocating 1025 bytes
MicroPython 11ab899 on 2022-02-10; ESP32 module with ESP32
Type "help()" for more information.

Cannot reproduce with ESP-IDF v4.0.2 and also with v4.2.2 everything is fine.

CANDIDATE · ISSUE

Wrong message on malloc fail

openby Tangerinoopened 2024-11-03updated 2026-03-24
bugport-esp32needs-info

Port, board and/or hardware

esp32

MicroPython version

MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32

Reproduction

Allocated a big list

Expected behaviour

Fail with the right message

Observed behaviour

MemoryError: memory allocation failed, allocating %u bytes
MicroPython v1.24.0 on 2024-10-25; Generic ESP32 module with ESP32

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied