Skip to content
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

Out of memory after MANY runs of program that flashes leds #42

Open
ghost opened this issue Apr 2, 2020 · 0 comments
Open

Out of memory after MANY runs of program that flashes leds #42

ghost opened this issue Apr 2, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2020

I have a problem when after many, many runs, I get "out of memory" error while trying to flash leds.

To flash leds, I use this program: https://gist.github.com/depesz/df74ecd48ce32ad9438f0b7ab145220e .

It's wrapped in a shell script that checks input from remote source, and depending on input it calls either

sudo python3 flash.py -s 10 -e 30 -t 0.01 -r 100 -b 70

or

sudo python3 flash.py -s 10 -e 30 -t 0.01 -r -g 100

Generally there is about 1-2 flashes per 90 seconds. On average.

I found out that there is a problem with out of memory in the underlying rpi_ws281x library, but all I could find there is "Do you call ws2811_fini at then end of your script?".

I checked rpi-ws281x-python source, and it looks that ws.ws2811_fini(self.leds) is called from _cleanup, which, as far as I understand, should be called when program ends.

Do you have any idea on what could be wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants