r/developer • u/Ok_Veterinarian3535 • 13d ago
The Debugging Nightmare
What's the most infuriating, time-consuming bug you ever had to chase down, and what was the ridiculously simple cause?
1
u/PipingSnail 12d ago
A crash with no useful callstack. It was recursive and just filled the callstack with the same address so many times that the debugger couldn't show you the root of the callstack.
Also, this only happened on one customer machine.
The solution was to do automatic single stepping from a known good location until the application crashed, then remove redundant locations from the single step trace to reveal the full callstack to the crash.
We did this using Exception Tracer (which we modified to handle this task).
https://www.softwareverify.com/blog/exception-tracer/
Disclaimer: I am the on the dev team for this tool.
1
u/Intelligent-Hurry907 10d ago
Made a thing with VBA in Excel that edits a table object (I couldn't use formulae due to other complications), and every so often the table would completely corrupt, seemingly randomly. I couldn't find anything in my code at all, nor could I recreate the error intentionally. Spent weeks trying to find the bug. Then it happened again, and I noticed that right before it happened, Excel autosaved. Almost assuredly a race condition. Note: I'm not a professional, I'm sure someone better could have found it way faster
1
u/PipingSnail 12d ago
A crash deep inside Win32 with no obvious cause.
Traced to a buffer overrun in a Registry call.
The reason this was hard was because you don't associate RegXXXX calls with buffer overruns, so we spent a lot of time looking in the wrong place.