This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
Matrix boot stability #90
Labels
🏚️ bug
Something isn't working. Attach project label also
📯 help wanted
Stuff that would benefit from extra collaboration
🚥 rgb-matrix
@digital-alchemy/pi-matrix, pi-matrix-client, rgb-matrix
Issue
Pi matrix code has a habit of being crash prone around boot. This appears to originating from lower level libraries throwing errors. These errors seem to come in 2 types, but either one will happily happen in back to back runs with no obvious changes to the situation:
corrupted size vs. prev_size
free(): invalid pointer
Investigation notes
Faulty bindings
Since there are github issues with the same thing happening for other people with
rgb-led-matrix
, and the issue is not super consistent here, it's probably being done here. Ex: bad arguments into a method somewhere, or order of operations in application wiring (in the domain of this repo at least)Open questions
If it happens as a result of font loading, or basic
LedMatrix
constructor, life is gonna suck. There might be some detection of that situation that can be thrown in, and do some sort of magic to try to break the boot loot situation?Unclear how this would affect anything yet, since widget rendering involves explicit
clear
calls.Extra Solutions being investigated
Error trapping at lower levels
Working within node to debug this results in a lot of random noise in observations. The error seems to bubble up through the n-api layer, and crash the app directly, not running any of the shutdown hooks.
#89 asks for the creation of more locally controlled bindings. It may be possible to fix (preferable) / trap / bubble up the error differently from there
The text was updated successfully, but these errors were encountered: