-
Notifications
You must be signed in to change notification settings - Fork 29
030 DEVICE_HEAP_ERROR codal error on long-running code using neopixel and display #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's not very likely, but I wonder if the Could you also try commenting out the Neopixel code and see if that still triggers it? If it still happens there it points at maybe the leak being in the neopixel CODAL layer. |
If there was a failure to allocate memory wouldn't that create a I may be out of touch for how GC works in MicroPython/CircuitPython. I thought it didn't have compaction but I'm wondering if it has segregated areas for small and large objects or heuristics/hints for short and long lived objects? |
I was able to replicate this with the original code and the current MicroPython in the micro:bit Python Editor. This does point at the issue being in the CODAL neopixel implementation.
Yeah, I think you are right, that should have raised a MicroPython memory error instead.
I know CircuitPython did this a few years ago, I'm not sure if MicroPython has done the same or something similar. |
@microbit-carlos That's actually how my real application code evolved. When I was doing a lot of list growing and shrinking I got
|
neopixel-thirty-bug-repro-7.py is likely to eventually produce a
030
(DEVICE_HEAP_ERROR
) on a micro:bit v2 perhap after 4-50 hours of running. It will do this without any WS2812 RGB LEDs attached, as expected.This is on
MicroPython v1.18 on 2023-10-30; micro:bit v2.1.2 with nRF52833
.Worth a second check but I don't think it has any memory leaks in the python code.
Some discussion about this in #227
I see one old issue which had unexplained
030
errors: #191The text was updated successfully, but these errors were encountered: