Illegal Exception when opening Options GUI (solved)

Started by Akril15, Tue 19/04/2011 04:30:30

Previous topic - Next topic

Akril15

Hello,

I've been working on a custom "options" GUI which is similar to the classic Sierra one: buttons for saving, restoring and quitting the game, as well as speed and volume sliders. This GUI was behaving pretty well for most of today, but when I tried to open the GUI less than an hour ago, the game crashed and I got an error message that included this text:

QuoteAn exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0043FBE7 ; program pointer is +379, ACI version 3.12.1074, gtags (2054,13)

I've tried disabling various parts of the GUI to see if I could isolate the problem, but so far, I've had no luck. Every time I try to open the options GUI (from any room in the game, by clicking the icon on the Sierra-style icon bar or pressing F5), I get the same error message. What can I do to fix this?

Khris

Check the GUI dimensions, size and BackgroundGraphic. Are you trying to display it off-screen? Are you using a BackgroundGraphic with another color-depth than the game? etc.

Akril15

Quote from: Khris on Tue 19/04/2011 18:40:30
Check the GUI dimensions, size and BackgroundGraphic. Are you trying to display it off-screen? Are you using a BackgroundGraphic with another color-depth than the game? etc.
There doesn't seem to be anything off about the GUI dimensions -- the game's resolution is 640x480 32-bit, while the GUI is 315x412, and I've currently set it to appear in the top left corner. I also tried removing every graphic on the GUI, but I still get a crash whenever I try opening it.

I was able to change the content of the error message by removing some code in rep_exec connected to a button on the GUI whose normal graphic is 2054. The button changes the value of a certain variable when pressed and changes its appearance to reflect that change. I've temporarily removed the code pertaining to the button's appearance, but now I get this error message when I try to open the Options GUI:

QuoteAn exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0043FBE7 ; program pointer is +379, ACI version 3.12.1074, gtags (2,13)

The only thing that has changed is the first number in brackets at the end -- now it's 2 instead of 2054. If it's referring to sprite #2, I don't know what to make of it, since sprite #2 doesn't appear at all on the options GUI.

Akril15

Well, even though I wasn't able to determine what caused this problem, I still managed to solve it. When I removed one of the controls from the GUI, the number in the error message I mentioned earlier changed from 12 to 11. I removed another control and it changed to 10. On a hunch, I decided to transfer all the controls to another GUI one by on. As I suspected, the error message stopped appearing only after the original GUI was completely stripped of its controls. The replacement GUI works just fine, even with all the original graphics implemented.

I have no idea what happened to cause this error -- I wish I did so I could make sure it didn't happen again, but at least I know what to do if it does make a reappearance.

Sephiroth

#4
These things happen in programming, sometimes you just forget a part of the code you wrote or you may have used a scriptname already reserved, out of range index like the sprite number or whatever.

It most probably comes from the user, I haven't had any issues with guis even after heavy mistreatment... If the problem persists and there's no precise debugger output to help you, then you could either send the game file in PM for quick debugging or report the problem as an officil bug. Anyways, happy coding!

SMF spam blocked by CleanTalk