adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
Other
4.09k stars 1.22k forks source link

RP2350: gc.mem_free() causes hang or crash #9760

Closed bit-13 closed 17 hours ago

bit-13 commented 23 hours ago

CircuitPython version

Adafruit CircuitPython 9.2.0-rc.0 on 2024-10-23; SparkFun Pro Micro RP2350 with rp2350a

Code/REPL

import gc
gc.mem_free()

Behavior

REPL either hangs or system crashes (USB drive disconnect/reconnect)

Description

Right after unboxing my new RP2350 board installed CircuitPython 9.2.0-rc.0 and ran the above command, which hung the REPL. Attempting to allocate a large amount of memory with x = [0]*10000 also causes a hang. Either this is a bug or there's an issue with the PSRAM on this board…

Additional information

No response

dhalbert commented 17 hours ago

This was reported earlier in #9755 and was fixed in #9759, and will be in 9.2.0 final. You can try the artifacts in #9759 if you'd like.