Stupid Bugs
Stupid Bugs
Geez, I just spent the last 2 days looking for a strange bug that looked like it didn't have an explanation. I was pulling my hairs out because it didn't make sense. Do you know what it was? I found that a certain '>=' should have been simply a '>'.
What the longest time you've spent looking for a bug that turned out to be ridiculously simple?
What the longest time you've spent looking for a bug that turned out to be ridiculously simple?
-
- Posts: 2428
- Joined: Jul 19, 2006 19:17
- Location: Sunnyvale, CA
- Contact:
He he, the implicit question arising from this is how do we define "bug"?agamemnus wrote:In total time wasted, or from the time I noticed it to the time I finally figured out how to fix it?
In total time wasted, maybe 8 hours.
From the time I noticed it to the time I finally figured out how to fix it: months, years, even never.
For instance:
- Mike writes human artificial intelligence code
- Mike hits the Run button
- The code does not respond as expected
(Actually, it doesn't respond at all, no matter what Mike does to it)
- Mike concludes: "There's a bug in my code!"
See? :-)
Cheers,
Mike
That's why there are debuggers.Ophelius wrote:h4tt3n: A bug in my definition is an output which isn't identical to what is expected.
The most I've spent is probably around 3 whole days(8-12 hours each) trying to find a stupid bug. It's so relieving when you find it and can move on.
BTW, debugging is where GOTO shines the most.
duke4e:
Don't forget && and ||. ;*)Sometime I need to port snippets of FB code to C. Every once in a while I forget to put == instead = and then I have "much fun" finding out what is wrong with the code.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Yeah, pointers can be a real pain in the ass. Random crashes are my favorite.
Somewhat related, but really interesting and fun article can be found here:
http://www.gamasutra.com/view/feature/4 ... tricks.php
Somewhat related, but really interesting and fun article can be found here:
http://www.gamasutra.com/view/feature/4 ... tricks.php
I find that bugs that cause crashes are easier to find than bugs that just keep a program from doing what is expected. I spent the better part of a day trying to figure out why a routine wasn't working as expected only to discover it was a bug in the EOF function. The Insight debugger is an excellent tool for identifying crash points. I would recommend it to all FB users.
-Vince
-Vince
-
- Posts: 1186
- Joined: May 08, 2006 21:58
- Location: Crewe, England
My worst one was on an airline system (peculiar IBM Asm environment) which I was unfamiliar with. Spent months looking at it, and never did figure it out.
In another job, a colleague spent weeks trying to find a bug in our multi-thread banking inquiry system (also IBM Asm). He was beginning to believe an op-code was broken on the CPU! Eventually turned out to be an unrelated module was zapping memory based on an uninitialised pointer register.
Most impressive: working on a manufacturing planning system with a built-in scripting language. I was relatively new, and sent to the client's site in Germany with the phone no. of a guru who had left the company and moved to Bangkok. He said first off to get them to print out the memory dump - which was two trolley-loads and took most of the day! This gave us some thinking time. Aftrer 3/4 of it was printed (late afternoon), I spotted the bug in the source code, and confirmed it in the disk version of the dump. Bangkok guy said: "check a couple of pages in the printout, to prove you needed it, then tell them you've solved it".
In another job, a colleague spent weeks trying to find a bug in our multi-thread banking inquiry system (also IBM Asm). He was beginning to believe an op-code was broken on the CPU! Eventually turned out to be an unrelated module was zapping memory based on an uninitialised pointer register.
Most impressive: working on a manufacturing planning system with a built-in scripting language. I was relatively new, and sent to the client's site in Germany with the phone no. of a guru who had left the company and moved to Bangkok. He said first off to get them to print out the memory dump - which was two trolley-loads and took most of the day! This gave us some thinking time. Aftrer 3/4 of it was printed (late afternoon), I spotted the bug in the source code, and confirmed it in the disk version of the dump. Bangkok guy said: "check a couple of pages in the printout, to prove you needed it, then tell them you've solved it".