“Catastrophic” Bug

Don’t worry, no damage done to the code… though I suppose there could have been if I wasn’t careful. Then what am I talking about when I say catastrophic? Well, as always, complexity came back to bite me, whereby a bug of the following type occurs in the development version of Inventor IDE (and probably Alpha 3 and earlier too).

  • A common operation doesn’t work properly. (e.g. in this case, dragging text or pasting text will cause it in certain cases)
  • Any further operations by the user to fix the invalid result of the failed operation will not work. (e.g. in this case, even typing is unreliable after the bug occurs)
  • Some further operations by the user to fix the problem make the problem worse or different. (e.g. in this case, deleting anything in global scope deletes the object but doesn’t remove the object’s representation from the UI or update any references to the object)
  • The only indication the user has that there is a bug is that things are going horribly wrong. (unless they can see the stack traces mounting in the optional console when running a JAR file)

The bug in this case involves a few operations involving editing text containing line labels (very common in assembly). In order to support refactoring of line labels in the code, I’ve got a bunch of special cases, and it seems that once again, they don’t handle every case. That’s right, I’ve had bugs with them before, including one I knew about but haven’t fixed yet because it wasn’t as serious or common as the many other problems (it was that swapping two adjacent line labels didn’t work).

This isn’t something easy to ignore either, because both C/C++ and Java have line labels, and more importantly, refactoring of local variables not at the top of a function in C/C++ and Java will need to work almost the same way as refactoring of line labels. This time, I’ll try to find a simpler solution that could be applied to any sort of declaration on a line.

It does set back some of what I was hoping to do by September 4th, but I’ll still at least finish what I really had to get done. Thankfully, that layout problem is almost completely fixed after a lot of work.


~ by Neil Dickson on August 26, 2008.

One Response to ““Catastrophic” Bug”

  1. I’ve been facing similar problems at work. They make me sad 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: