Hi,
I’m running into an issue where I get C errors intermittently when I run my project:
For background:
I’m currently working on a project where I’m utilizing a Raspberry Pi Zero with an Adafruit Hat to connect to an Azure Queue and display “scenes” it grabs from the queue to display on the board. Scenes are basically text marquees, static text, animations, or a rainbow transition.
This is the latest code I’m using to power the screen: https://thomasca.visualstudio.com/RGB%20Screen%20With%20Queue/_git/RGB%20Screen%20With%20Queue?version=GBhaving-matrix-sync-drive-events&path=%2FHelpers%2FScreenHelper.ts
And this is the current wire-up I’m using:
I’m using the latest version of DietPi with sound disabled and bluetooth uninstalled, and I’m using the typescript binding from alexeden/rpi-led-matrix. I’m also using the same hardware as this project: https://howchoo.com/pi/diy-raspberry-pi-nhl-scoreboard-led-panel.
Only difference I made is that I changed the screen out for this: https://www.amazon.com/gp/product/B07SDMWX9R/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1&fpw=alm
The issue I’m seeing:
Every so often when I start the project, the program will either error out after a few seconds, or show a few scenes, then flicker and crash. Every time, it reports a C error like the following:
“corrupted size vs. prev_size
Aborted”
or
“node: malloc.c:4028: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)’ failed.
Aborted”
After that, the program quits and the screen goes blank (sometimes it glitches before doing so).
I tried changing the program to refresh the screen after every afterSync callback (in the typescript binding), and tried refreshing scenes based on timing. Both approaches seem to result in the same crash. I also tried different configurations, but it either is just as stable as before or less so.
It’s very intermittent. Sometimes it will display everything correctly with no errors. But this is a bit rare.
I’m not really sure what I’m doing wrong here or if maybe I just have something configured incorrectly.