waveform80 / picamera

A pure Python interface to the Raspberry Pi camera module
https://picamera.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.57k stars 355 forks source link

no buffers available when using overlay update method #691

Open watchever opened 3 years ago

watchever commented 3 years ago

Hello, PiCamera api raise following exception when I use several times the update method on PiRendererOverlay. It does not process but would like to understand and know what to do to avoid the problem.

Thanks for your help

Traceback (most recent call last): File "_ctypes/callbacks.c", line 232, in 'calling callback function' File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1227, in wrapper self._pool.send_buffer(block=False) File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1931, in send_buffer super(MMALPortPool, self).send_buffer(port, block, timeout) File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 1881, in send_buffer raise PiCameraMMALError(mmal.MMAL_EAGAIN, 'no buffers available') picamera.exc.PiCameraMMALError: no buffers available: Resource temporarily unavailable; try again later

watchever commented 3 years ago

Just see this answer but don't know if it is safe : https://github.com/waveform80/picamera/pull/645/commits/9ba47809104984b1441c6f36c47b6f137578c9cf