   What bug do you frequent the most?
  I just spent 16 hours fixing two bugs that were a result of a typo. I confused one variable with a variable with a similar name. Which kind do you frequent the most or get the most head aches from?   
  Most common -- same as yoursMost headachy -- subtle heap corruption, or concurrency craziness. [ When a symptom of your bug can be turned on and off by adding or removing a print statement in a particular section of code, you know it's going to drive you insane ]   ;  None, when I have had enough trouble with a bug I will automatically be aware of that bug when coding. This means that I for instance doesn't depend on ADL (argument dependent lookup) to work correctly, and if I encounter an error this is one of the first things I check.EDIT: ok, there are still errors I have encountered numerous times and still encounter, like heap corruption. The cause of the heap corruption is always different though.   ;Quote:Original post by twixMost common -- same as yoursMost headachy -- subtle heap corruption, or concurrency craziness. [ When a symptom of your bug can be turned on and off by adding or removing a print statement in a particular section of code, you know it's going to drive you insane ]Yeah, on one of my old projects I get a lot of problems when I just change float to GLfloat in a particular structure when they were the same size.   ;  Recently: can't add Row to DataSet or can't Update DataSet.both annoying because i never find out the underlying reason why and i have to run back to Google and GameDev to figure it out. [razz] at SQL + C#   ;  The most bugs I find are due to bad design or not enough skill to forsee the issues that will arise when the coding is nearing completion.  I'm not sure if those issues are 'bugs' tho...I guess they are just a case of no-skills.   ;  I just spent the last 2+ hours chasing down a bug I got from being stupid and copy/pasting code from another one of my functions (the worst part was this was WinAPI & DirectX so I couldn't step through anything with the debugger).I had been filling in the data fields of someStructArray[numElements], which I stupidly copy/pasted into my d-tor:for (...){   delete someStructArray[numElements]; //instead of someStructArray ...Oops}This isn't the first time I've reused my own code incorrectly. I guess the bugs I run into most are just my own stupid errors brought on by laziness. And the worst ones to debug by far are bugs where you hose memory. Undefined behavior, I hate you.;  According to an article I read in Scientific American most bugs can be traced back to poor design.  Proper design will minimize bugs down the road.  Software like Alloy has been developed to assist in the task of software design.   ;  I once spent about four hours trying to find a major bug (OpenGL VBOs) in a small amount of code, comparing it to other examples that seemed to be written exactly the same, so I threw it away and rewrote it, and it worked perfectly.I have yet to this day figured out what it was.   ;  Mosquitos. Damn I hate mosquitos! But they're fun to fry!In programming, I've had bugs due to pointers to elements of std::vectors a few times. std::vectors can change memory location. Now I know that and now I'm really careful when pointing to std::vectors, or use std::lists instead.   