Unhandled Exceptions
Author | Topic: Unhandled Exceptions |
---|---|
Off With Their Heads
Member # 4045
|
written Saturday, March 12 2005 10:41
Profile
Homepage
What are the things that can cause an Unhandled Exception in BoA? I'm hoping to make a list to store somewhere to help designers and also possibly to send to Jeff so that he might be able to modify BoA so that these simply pop up an error message rather than killing BoA outright. I know two already: * Using a terrain or floor graphic that doesn't exist. This is a problem with wallsets that are not complete, for example: if you place a wall with a door from a wallset that doesn't include a door (ie, cave wall), this causes an unhandled exception. * Setting a creature facing a direction greater than 7 -- ie, set_character_facing(6,8). These both seem to fall under the category of using a graphic that doesn't exist. What are other known sources of an unhandled exception in BoA? EDIT: Found another one. * Over-running the string limit. I got an unhandled exception in Vasskolis when I tried to display a message from the text buffer that was longer than 256 characters. I'm not sure if over-running the text buffer itself was the problem or if trying to display it was the problem, but either way, the over-long string didn't give the over-long string error like it does on a Mac. [ Saturday, March 12, 2005 13:12: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Shock Trooper
Member # 4557
|
written Saturday, March 12 2005 13:36
Profile
I may be able to help in this matter by looking at the editor's code, but since I'm not a scenario designer I would need to know what BoA does give an error for. For example, if you specify a location that is invalid, like (2000,4000), does it crash BoA or give an error? EDIT: For clarity: by "crash BoA" I meant the program gives an Unhandled Exception, and by "give an error" BoA actually says what the error is. [ Saturday, March 12, 2005 13:44: Message edited by: KernelKnowledge12 ] Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
...b10010b...
Member # 869
|
written Saturday, March 12 2005 13:37
Profile
Homepage
Illegal arguments for functions in general can cause crashes, even if they don't involve graphics. I crashed BoA for Mac once by forgetting to put quote marks around the strings in a print_big_str_num() call. -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Infiltrator
Member # 148
|
written Saturday, March 12 2005 13:38
Profile
I'm not too sure, but wasn't there a problem if you tried to reference a town locations that did not exist? I.e, in a medium town, (63, 63). I believe it gave an error. Or was this fixed by Jeff? -------------------- My ego is bigger than yours. Posts: 480 | Registered: Thursday, October 11 2001 07:00 |
...b10010b...
Member # 869
|
written Saturday, March 12 2005 14:04
Profile
Homepage
quote:As KK12 suggested above, this can indeed cause a crash. Jeff's aware of it and freely admits that BoA's exception handling is, if you'll pardon the pun, less than exceptional. [ Saturday, March 12, 2005 14:04: Message edited by: Thuryl ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Shock Trooper
Member # 4557
|
written Saturday, March 12 2005 14:30
Profile
Come to think of it these errors should not be fixed by Jeff. This would require the game checking every time for a possible error, even if the error isn't there. This might seriously slow the game. We should, however, ask Jeff to create a debug version of the game that does check for things like this. This should take just as long as fixing the App. As for errors, these come to mind: - Over indexing an item/creature/floor/terrain - Using a string that is over 256 chars - Using a string over 30 chars in setting an item's full_name - Using a string over 14 chars in setting a scripts name - Using a string over 20 chars in setting an object's (floor/terrain/creature/item) name These are only possible errors. I have no idea if they actually crash BoA. Also, this is a very small list, compared to all the things that could in theory crash BoA. I'd rather not put them all down until I have a better idea of what is handled in BoA. Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Post Navel Trauma ^_^
Member # 67
|
written Saturday, March 12 2005 14:57
Profile
Homepage
I'm sure modern processors can handle the overhead of checking that arguments to calls are within the right range. It'd only be a few instructions for each call, with the possible exception of some weird ones I can't think of right now. -------------------- Barcoorah: I even did it to a big dorset ram. desperance.net - Don't follow this link Posts: 1798 | Registered: Thursday, October 4 2001 07:00 |
Off With Their Heads
Member # 4045
|
written Saturday, March 12 2005 15:09
Profile
Homepage
Most of those string errors are handled properly by BoA's compiler. I think if you over-load the text buffer on Windows, that isn't, but the others are. I'm not talking about the error messages that BoA normally gives, like the ones that happen if you mis-spell a call or don't declare a variable or something like that. I'm talking about the ones that pop up an Unhandled Exception error and then cause BoA to quit. Also, if Alint can check a script in well under a second, I think it shouldn't be a problem in BoA. [ Saturday, March 12, 2005 15:10: Message edited by: Kelandon ] -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Shock Trooper
Member # 4557
|
written Saturday, March 12 2005 15:12
Profile
Yeah I guess I overstressed the detriment to game speed, but the fact that some scripts are only run once every some turns, implies that BoA's scripting engine is generally slow. The editor's code implies that BoA does not go the traditional route of converting scripts to byte code before running them, which slows script execution. Of course, this is all speculation. EDIT: Just read your post, Kelandon. Alint checks one script. BoA simultaneously reads several scripts, relates them to game's actual state, updates the game state, and then actually runs the game. The added checks probably wouldn't do much to game speed, but as a programmer I guess I've been sort of indoctrinated to think in terms of efficiency. [ Saturday, March 12, 2005 15:21: Message edited by: KernelKnowledge12 ] Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Warrior
Member # 4792
|
written Monday, June 20 2005 20:04
Profile
Most of what is being discussed here seems to do with overlong strings or missing graphics. I however, have encountered this error (unhandled exception) when moving between towns (plus I figured out that if you move diagonally toward a one square thick strip of a special encounter trying to move you to another town, it will instead transport you outside) and when killing an NPC. [ Monday, June 20, 2005 20:08: Message edited by: Venom ] Posts: 57 | Registered: Wednesday, July 28 2004 07:00 |
Agent
Member # 4506
|
written Monday, June 20 2005 23:16
Profile
Homepage
If the custom graphics sheet is the wrong size for this creature, when it dies it calls this sort of error! (As in Xerche'De) - Archmagi Micael -------------------- "You dare Trifle with Avernum?" ~ Erika the Archmage -------------------- My Scenarios: Undead Valley : A small Undead problem, what could possibly go wrong? -------------------- Richard Black - PROOF of his existance (the Infernal one's website). -------------------- MY FORUM! Randomosity at it's highest! :) Posts: 1370 | Registered: Thursday, June 10 2004 07:00 |
Triad Mage
Member # 7
|
written Tuesday, June 21 2005 04:30
Profile
Homepage
quote:This had much more fun consequences in Blades of Exile. Such as turning townspeople into crazy superbeasts. I kid you not. -------------------- "At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander ==== Drakefyre's Demesne - Happy Happy Joy Joy Encyclopedia Ermariana - Trapped in the Closet ==== You can take my Mac when you pry my cold, dead fingers off the mouse! Posts: 9436 | Registered: Wednesday, September 19 2001 07:00 |
Warrior
Member # 4792
|
written Tuesday, June 21 2005 19:25
Profile
quote:No, if a graphic is the wrong size, it will give error messages about the graphic when it first sees it, not when the character dies (unless, of course, the problem lies in the dying graphics). In any case, it has not been my experience that this crashes the game, it merely impedes progress by many errors. I have had that problem a few times, but it is not nearly as severe as an unhandled exception. I have been able to track down and fix this particular error, however, as I explain here: Unhandled Exception Posts: 57 | Registered: Wednesday, July 28 2004 07:00 |
Warrior
Member # 4792
|
written Friday, June 24 2005 09:39
Profile
I have encountered two more unhandled exceptions: 1. I used the relocate_character on a Drake Lord character in my scenario to put him on a chair. As soon as my party is in visual range, the error occurs. I fixed this by not putting him on the chair. 2. In "A Large Rebellion", I tried to speak to some NPCs in the largest town (forget name) and when I speak with ones that do not have dialog scripts, I receive the error. I did not investigate as to the cause of this error because that scenario hurt my head too much. Posts: 57 | Registered: Wednesday, July 28 2004 07:00 |
Off With Their Heads
Member # 4045
|
written Friday, June 24 2005 09:55
Profile
Homepage
1. Did you have the graphic set to the right size (cr_small_or_large_template)? This seems like the most likely culprit. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Warrior
Member # 4792
|
written Saturday, June 25 2005 21:35
Profile
No, it was set to the right template, 1. However, I have used the wrong template setting before and it does not give an unhandled exception. Rather, it gives a graphical error, drastically slows the game, and displays a corrupted image. At least that has been my experience. Anyways, the point is moot as I have a work-around for the problem. But I suppose it might be helpful in further diagnosing this dilema. I was wondering why this topic was started in the BoA editor forum? It seems to me the problem is with BoA itself, not the editor. Posts: 57 | Registered: Wednesday, July 28 2004 07:00 |
? Man, ? Amazing
Member # 5755
|
written Saturday, June 25 2005 21:41
Profile
I had the same problems with large rebellion. i don't think i solved them (except to run far away). Regarding your drake Lord. Is there a graphic of him sitting in a chair? Cuz BoA will want there to be one. *this message is not condemning ALR, just its bugs* -------------------- quote: Posts: 4114 | Registered: Monday, April 25 2005 07:00 |
...b10010b...
Member # 869
|
written Saturday, June 25 2005 23:53
Profile
Homepage
quote:Any questions related to scenario design are meant to go in the Editor forum. So if a problem you're having is occurring in a scenario you're designing, you probably want the Editor forum. (Actually, it's probably a good idea to put technical questions in general in the Editor forum, and save the BoA forum for gameplay questions.) -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Master
Member # 5977
|
written Sunday, June 26 2005 00:56
Profile
Homepage
I was wondering what exactly are those unhandeld exceptions? -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
...b10010b...
Member # 869
|
written Sunday, June 26 2005 01:49
Profile
Homepage
An unhandled exception basically means that an error occurred, that the application itself didn't respond to the error, and so Windows stepped in to shut the application down. In these cases, the unhandled exception errors are probably mostly attempts to access illegal locations in memory. [ Sunday, June 26, 2005 01:50: Message edited by: Thuryl ] -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |
Master
Member # 5977
|
written Sunday, June 26 2005 08:52
Profile
Homepage
Although I'm a mac user, I think that happened already quite often with the editor. Macinstosh didn't shut the program down (Thank god, otherwise i would have to do all that work again!), but an error of the program itself showed up, saying it didn'r have enough memory, or the graphic the program wanted to acces wasn't there (but it was there). But this isn't a unhandeled exception, is it. -------------------- Play and rate my scenarios: Where the rivers meet View my upcoming scenario: The Nephil Search: Escape. Give us your drek! Posts: 3029 | Registered: Saturday, June 18 2005 07:00 |
...b10010b...
Member # 869
|
written Sunday, June 26 2005 15:58
Profile
Homepage
No, that would be a handled exception. :-P -------------------- The Empire Always Loses: This Time For Sure! Posts: 9973 | Registered: Saturday, March 30 2002 08:00 |