Sign in to follow this  
  • entries
    132
  • comments
    99
  • views
    88618

Bad Behavior

Sign in to follow this  
Driv3MeFar

193 views

Just because your program behaves badly, doesn't mean your error messages have to. Today at work I encountered a bug that turned out to be wxWidgets running out of resources. It took me pretty much all day to track down, which is much longer than it should have. The problem was that when wxWidgets ran out of resources, it popped up a modal dialog. This dialog had the ever so helpful title of "Error", and the dialog consisted of an Ok button. That's it. No explanation of what went wrong or where it happened or how to fix it. Just a dialog titled "Error" with an Ok button.

But that wasn't the worst part. When this particular map was loaded in the editor, Unreal pops up a dialog box warning you that one of the level packages could not be found. Fine, whatever, it's a content issue, I'm sure they'll get it fixed soon. The big problem was that this dialog was coming up over the wxWidgets error message, making it loose focus. But, it's a modal dialog, so you can't do anything until you hit that Ok button. This is a problem. First off, I can't see the dialog, because Unreal's warning message is over it. Second, I can't close Unreal's warning, because any attempt to click the mouse just beeps at me, because there's a modal dialog open. Ugh.

At first, I just thought the program was freezing up when loading the level, because it stopped responding to everything. Then, I plugged in headphones and started hearing the Windows error sound every time I clicked the mouse. It ended up taking me the better part of the day to figure out what should have been a straightforward error.

So remember, even if your program does something wrong, don't make the error message behave badly. Give some information about what the error was, and how it might be fixed. And if it's an error that can be recovered from (as this was, if you could actually hit the Ok button, the program would run fine, you'd just be missing a few widgets), don't distract me with a modal dialog, just write out the error to the error log and continue on.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now