Mobile Zone is brought to you in partnership with:

Alec is a Content Curator at DZone and lives in Raleigh, North Carolina. He is interested in Java and Android programming, and databases of all types. When he's not writing for the NoSQL and IoT Zones, you might find him playing bass guitar, writing short stories where nothing happens, or making stuff in Java. Alec is a DZone Zone Leader and has posted 580 posts at DZone. You can read more from them at their website. View Full User Profile

AskDZ: What's the Worst Bug You Ever Found and Solved?

  • submit to reddit

Every developer has, at one time or another, been faced with a bug that is different from other bugs. It may be a mistake of massive proportions, or something so small that the consequences couldn't be anticipated, or just comically unfortunate. If there is justice in the world, you can fix these bugs when you find them, so...

What's the most frustrating, challenging, or generally problematic bug you ever found and solved, and how did you do it?


Anders Abel replied on Tue, 2013/10/08 - 1:12pm

The worst bug I've ever tracked down and fixed was a system freeze hidden in some 300.000 lines of code. It was only experienced when the device was left untouched for about an hour (typically a lunch break) while mounted in a grader and connected to a high precision GPS. I only had a few days to find and solve it.

The device used GPS measurements to automatically control the height and angle of the grader's blade, by connecting to the graders hydraulic system. We're talking about a system where the data sent out actually did things in the physical world instantaneously.

We had been working on the system for nearly a year and it was during the final field tests that the bug was found. It only occurred once every few days, but it was frequent enough to be a blocker for the release of the product. The large problem was that we were never able to reproduce the bug in a lab with a debugger attached. It only occurred when the device was wired to a proper million dollar machine. Just the GPS receivers cost tens of thousands of dollars.

The code base was large and was completely multi threaded. The only thing I could do was start reading.

I started at the core GUI message pump and tried to follow all code paths to find out where the GUI thread could possibly get stuck. After a few days of digging, I found that someone had created an extra message pump in a section of the GUI that displayed the results of some background tasks. It was a hack to keep the background tasks running and reporting status so that the GUI could be updated. Once removed and reworked into a proper message passing design we no longer experienced any hangs.

The project manager was happy too - he got another bug to mark as fixed in his excel sheet, although he complained that I had taken a long time to fix mine compared to the other bugs, which were mostly fix-a-typo or move-a-widget-2px-left style bugs...

Mitch Pronschinske replied on Wed, 2013/10/09 - 8:27am

 There's also lots of good stories here on this SO question.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.