Sunday, May 9, 2010

Bug Hunt

This weeks StrokePlay Time has been spent tracking down the last of the bugs on my list.

There weren’t many but two of them took too long to find a cause for.

The first one was an exception that was occurring on the custom golf rounds list control.  Every time the scorecard deletion functionality successfully processed a deletion an instance of the control on a different tab page would throw an access violation exception.  It took a while to find but it was a simple fix – the scorecard that had been deleted was still being referenced by code which processed the refresh of the list control.

The second one was puzzling.  The “date played” being displayed for a scorecard being updated (as opposed to a new card being added) kept changing to todays date when it was shown on the window.  It was odd because it was only the object in memory that was changing rather than the data in the database.  In the end it was a bit of code I’d omitted to change when adding the update functionality – the window was incorrectly assuming it was being asked to add a new card rather than process an update which meant it was pre-populating data it shouldn’t be.

Simple, but time consuming to find.  Still, that’s the last two bugs on the list fixed.

No comments: