Friday, 8 July 2011

A bug reporting public service announcement

Ever get this error message in Maestro?

Object Reference not set to an instance of an object

This message and its exception type of System.NullReferenceException generally means that I (or a library I'm using) screwed up somewhere in the code.

However, just generally telling me this happened does not help me or you one iota because I require additional information:

  1. A stack trace of this exception message (so I can trace down the offending location in the code)

  2. The steps you took to produce this error (so I can construct the possible sequence of events and data that leads up to the offending location in the code)

  3. The data you are working with (where applicable)

Without these pieces of information, it makes it very hard for me to fix the cause of such errors.

The error handling in Maestro 3.5 now uses a more flexible dialog to display such exception information. Exceptions are now displayed in a more flexible dialog.

The message and detail components can both be copy/pasted or you can save the entire error dump to a text file and upload that as part an attachment to your trac issue, allowing for better quality bug reports.

However, what I have just explained doesn't just cover Maestro or this specific error. This is good practice for reporting bugs and issues in any application you use. Bad bug reports will most likely stay ignored because there is not enough information to work on. Developers are not psychic people, we need as much information as possible!

Providing at least the information as I've pointed out is a good start for any bug report and ensures that the developer can provide a suitable fix or workaround for you particular issue.

No comments: