
Usually, if I have a member constant I want to have configurable in my constructor, I have it by the same name in the constructor parameters. In this case, ModePattern* backingMode was passed in, and then saved for later use in the constructor list via backingMode(backingMode). This pattern has worked fine for about two years (
) at this point.
Today, it stopped working because I had a lambda function which captured by reference, [&](){...}-like. I had copied out the pattern sampling function, backingMode->sample(samplePoint, Layer::Primary) from another function in my class. Copy-paste-done, works perfectly, moving on. Except.
I'd copied it into my constructor. The way precedence works, backingMode is looked up first in function args, then in class members. So when I moved the line of code up to the constructor, inside the lambda function, it neatly captured a reference to the constructor parameter instead of the class member function which was being used previously. And this worked fine, until I actually went and looked up a member variable in the lambda which was run after the function returned. A few seconds later, the memory was overwritten with some value that pointed into the zero-page, and I get the error.
It could have been hours. We got lucky this time. 
Anyway, I just learned how addr2line works in Linux, so that's useful going forward. I'm... new to this yet. Another entry in the #ravelights development ongoing saga 