I am trying to implement dynamic resize for a termbox2 application and simple pattern works flawlessly. But things get very chaotic when I am trying to implement advanced patterns. My original approach used gpallocator and it worked as expected, but I could not figure out the way to free array allocations due segfaults (single updateWidthSec works but not both). So I started reading lib src and found BoundedArray. But with this approach, width/height arrays are corrupted. For weeks tried to refactor and merge these functions into one, move around the calls, increased delays—nothing works, and errors do not output anything useful (bus error, segfaults and just empty errors (all runtime)).
patch:
https://github.com/charlesrocket/xtxf/commit/ab8d39fc15acf44d33b768c62f4025c7ad4d5407
also this only works on release builds for some reason, not debug
feels like allocator issues are due scoping conditionals, but bounded array issues are without any useful error outputs so not sure why this is happening (bug or i need to be more gentle with the stack, cannot tell 🫠)