Description
Over in the C# wrapper lib, you noted you'd gotten things working and then started hitting segmentation faults.
I made the same changes you made (basically), got a P/Invoke solution working, went to get a cup of coffee, and when I tried it again - Segmentation Fault. Rebooted the Pi... seg fault. I'm legitimately stumped as to why. I run the program and as soon as it tries to write to the LED strip, segmentation fault.
I'm curious if you've tried this SWIG-based wrapper. It feels heavy-handed, but the only thing I can think of is that there's some sort of incorrectly handled memory pinning or marshaling going on.
Something super weird: If I add some Console.WriteLine
statements in before I try rendering to the LED strip, I can actually get some of the LEDs to work. Out of a strip of 540 LEDs, I can get to about LED 50 before the seg fault hits - and the only difference is the Console.WriteLine. I have no technical proof, but my gut is saying it has something to do with the memory allocated for the string getting written to the console. Like it's just enough to shift things around and allow the program to work.
But why it stopped originally I honestly can't say. Worked, then just didn't work anymore.