I once contracted with a shop that had a process that generated garbled output data rows. It appeared to be extra stuff that didn't affect (over-write) the intended rows. The shop had added an extra processing step to filter out the garbage rows and eventually just worked around the glitch.
They had asked me to try to track it down, among other projects, because they were newbie programmers. I couldn't figure it out either because it never appeared in my intermediate trace statements. I put a trace (print) statement before every "write" in the program. None of the prints showed the garbage, yet garbage ended up in the output file. Head-scratcher galore. I was supposed to be "the expert", and thus feeling a bit deflated.
On I think the last day of my contract, I was running a test copy of the code with some changes to perform speed tests. I went to try a certain speed tweak, and I suddenly spotted the error: the file handle variable was re-used for another non-handle purpose, something like this:
fhandle = openFileForWrite(fileName);
fhandle = countX + countY - 7;
The actual handle name was something like "qhand". But a regular variable, "quantity on hand" ended up "qhand" also, the same name as the file handle.
When it dawned on me what happened, I started screaming like a wildman and the others popped out of their cubicles to see what was going down. They took my coffee away :-)
As far as the link on goofy video game bugs, I remember somebody discovered that if you don't put a game cartridge in all the way, certain characters dance and spin randomly and rapidly in the sky.
It created an Internet meme, and spoofs started appearing all over, typically using stop-motion with live actors. I forgot the nickname of the meme, but I found it hilarious. It took my mind off the handle bug.