-

@ Harry Sintonen
2025-05-02 22:34:29
The code originally made a copy of a struct before modifying the copy. The original was then used afterwards. I entirely missed the later use and that it was *critical* that the original struct was used as is. So I passed a subtly modified struct to the later processing, which, in combination with a second bug I had introduced some time earlier, caused all kinds of havoc.
There was *another* bug I also introduced, which funnily had similar effects. This bug was added months ago, and it affected only older OS versions. I typically only run the bleeding version during development (but I had tested the change with older versions, too). Unfortunately, this issue was random as it depended on stack contents to get triggered, and thus went unnoticed until the additional scrutiny introduced this intense debugging session.
The combination of these factors made this highly frustrating thing to debug, as any kind of A-B testing fails when you have multiple or random issues.
#bugstories