Solving a Bug

I have spent close to 1 week trying to resolve a bug that I was using in a product which proxies calls from java to win32.
Basically the bug caused the JVM to crash, with an “Memory violation” error.

The project fell out of it’s deadline, and though amidst this pressure, and the failing to deliver on time I learnt some fundamentals to keep a cool head.

When you dealing with a BUG of unknown characteristic or a pure anomaly (by appearance), this is my advice:
– Get done to where the problem lies
– If you don’t understand that line of code or function, spend time with it.
– Live inside the debugger, step through the code, remote debug, understand the problem.
– if you become disillusioned, don’t make large changes. Where the bug might point to a problem, might not be the real problem, but only a symptom of a problem.
– Track you changes, and be able to switch between them.
– Change small pieces, implement, test and test again.
– When you lose hope, BE BRAVE! This isn’t magic. Go back get a Performance monitoring tool like Performance Explorer, review your Handles, Memory, Threads etc.
– Simplistically, ensure you understand every piece of code you used (as sometimes we tend to copy and paste without understanding)
– Spend the hard miles understanding instead of re-arranging and testing.
– Don’t try reach for the tree tops, when you could just cut down the TREE.

Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply