Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Thursday, November 13, 2008

Two hours debugging...

Thursday, November 13, 2008   

I ran into a bug today that cost me two hours of debugging. I was calling a method multiple times, and in certain circumstances some of the code in the method failed to work. 

pseudo-code:

private function foo( indx:uint ):void
{
   doSomething( indx );
   // rest of code
}

Now, when I was accessing something on the DisplayList in the doSomething method & it failed, the code under the method call in the foo method just didn't fire. No compiler error, no runtime error box, and I'm running the app as a projector - so I'm using mainly Arthropod to debug.

I know I could have done plenty of things to track this down a lot sooner, but I was surprised that the code after the method call with the bad bits just wouldn't get called at all, but the app would run fine regardless. Only in edge cases was the indx out of range for the DisplayList. And I've fixed that since (good thing too). Just never ran into a bug that behaved like this one before.
 
 Return to the main page
Comments:

There are currently 0 Comments:

 Leave a comment