← index #8294Issue #4518
Related · high · value 3.410
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

memory allocation error from time to time after machine.reset()

openby nedoskivopened 2019-02-18updated 2024-09-19
needs-info

Hello,
I'm using ESP32 with MicroPython v1.9.4-684-g51482ba92 without PSRAM

I got lot of stuff some _threads, while writing and changing I often restart the board, using machine.reset()

from time to time i got memory allocation error when my scripts start to load. So question is why, board reboot if some of them are too big it should fail every time. Not from time to time. Is there something that I'm missing?

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