What to do when you have exhausted all avenues to fix a bug

debuggingjunior-programmer

I am a Junior Programmer(4 months career experience so far) working on a Cross Platform Mobile Application (1 person team – so its just myself).

I have a bug in this program/app which is pretty large (30 different header files, each with their own cpp file too). I have been trying to track down exactly what is going on with the bug & also to fix it (even tried to use some hacks to just get it working) but of about a dozen or more solutions(ideas I have of whats causing the problem) I have come up with nothing has led me to track exactly what the bug is or fixed the bug.

Do you have any advice for a junior programmer of some broad techniques(go for a run, print all my code onto paper & go through it with a pen, etc.) I could use to assist me with this bug?

To give a little more context for my bug; it involves the cross platform API Mosync, when I perform a specific sequence of actions, the current screen does not redraw (& it appears) that the previously displayed screen is still receiving the pointer/key press events & not the current screen.

Specific sequence:
– Menu Screen Displayed – click "Show prev orders button"
– Prev Orders Screen Displayed – click "Load file" then click menu button & open Delivery Screen
– Delivery Screen Displayed – click menu button & open Purchase Screen
– Purchase Screen Displayed – Error here, input to this screen is not displayed/reacted to, ListViews dont scroll, buttons dont react to clicks, ListView cells dont respond to clicks


I will take the advice on board, the bug is reproducable 100% following the same steps each time, although it still very difficult to figure out how pointer events are being transmitted & to what screen due to fact thats a part of the API I cant reach(or dont know how to).

Also I would love to have a different pair of eyes go over my work & point out the bug, but as I said I am a team of 1, my boss directs me, he owns the company & has the ideas for an app but does not know c++ or any recent languages either (cobal? I think is all). Any advice on how to get a second pair of eyes without breaching/showing off the company's intellectual code/property?

…and no leaving this paid internship is not an option, the contract says if I leave before 6mnths of a 12mnth contract I maybe liable to pay 30% of my yearly salary

Best Answer

If you can reproduce the issue 100% of the time, set a break point on the last step (as early as possible). If you walk through the entire call stack, I'm pretty sure you're going to come up to some unexpected values somewhere, or something that should be called but isn't.

Edit:

And if you're sitting at your wit's end trying to fix the bug and posting here hoping that you'll get some shining light advice, walk away. Go clear your head and come back later (preferably tomorrow or after the weekend). There have been many a time that I've spent an entire day searching for a solution to a particular issue just to walk away, come back the next day with a clear head and find it within ten minutes.