hzeller / rpi-rgb-led-matrix

Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO
GNU General Public License v2.0
3.64k stars 1.16k forks source link

terminate called after throwing an instance of 'std::bad_alloc' #1473

Open clgyl opened 1 year ago

clgyl commented 1 year ago

Hi! I’m getting an error, randomly, when running a python program using the api. Does anyone know why and/or have seen this before?

_terminate called after throwing an instance of 'std::bad_alloc' what(): std::badalloc


Raspberry Pi 4 Model B Rev 1.4

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye

ledvinap commented 1 year ago

@clgyl : It can be caused by out of memory. Maybe you are allocating lots of FrameCanvas instances (they are quite memory expensive) and keeping reference?