
Description
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?