Monday, May 21, 2007

20/05/2007 - Sunday

I finally got rid of the bug I've been working on for the last couple of days. I got rid of it by changing the code to work around it as I just couldn't track down what was causing it to go wrong. I would identify an area of the code that I thought was the problem, debug it for a while, attempt to fix it, only to find that there's now a bug in another area, or the bug just changes location. This frustrated me for several days before I came up with a good idea which semi-worked, but didn't, for some reason that I'm still not sure of. I was storing a true/false value which defaults to false when I create an object, but for some reason the value was changing to true all by itself (I wasn't changing it to true myself anywhere in the code), which caused the rest of the code to fail as the value needs to be false at some point before it can become true.

This did take me to the solution that I came up with though, so it wasn't a full wasted six days of confusing work. I can now move on to the rest of the program as I hadn't even got that sorted (I needed this other bit first before I can really do the rest). Hopefully I haven't forgotten where I was going with this!

0 comments: