Bug: Illegal Exception (@CJ PLS notice this)

Started by buddha, Sun 04/01/2004 15:22:02

Previous topic - Next topic

buddha

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x0042F107 ; program pointer is +220, ACI version 2.60.693, gtags (1,198)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and notify CJ on the Tech forum.



Most versions of Windows allow you to press Ctrl+C now to copy this entire message to the clipboard for easy reporting.
---------------------------
OK  
---------------------------


I got the error shown above when calling a new room from my dialog like this:
@7  // option 7
new-room 2

But sometimes I get this error instead:


---------------------------
Adventure Game Studio
---------------------------
An internal error has occured. Please note down the following information.
If the problem persists, contact Chris Jones.
(ACI version 2.60.693)

Error: unknown new interaction command

---------------------------
OK  
---------------------------



Both happen while I do the same thing in the game. I just run a testgame and then sometimes I get the first error and sometimes the second one.
Or is it just me messing up?  ;)


#Update#

I decided to try and redo my test with version 2.56 of AGS
And to my surprise I got the same kind of 'Illegal Exception' error.

What I'm doing is just a test for a GK-style kind of dialog interface and the moment the error happens is basically when I want to leave the interface (read room) to go back to the room I came from.

Gilbert

hmmm are you sure that's the part of script causing the problem?

Try adding a stop after the new-room and see if that helps:

@7 // option 7
new-room 2
stop

Also, try commenting out the new-room line and see if it's really causing troubles:
@7 // option 7
//new-room 2
stop

buddha

#2
Thanks, but I already tried what you suggest, this is why I suspect this is the part of the script causing it. As soon as I comment out the 'new-room' line everything is just groovy. With the stop behind it I still get errors.

But as usual I don't exclude human error  ;)

Should you want to check it out here is my test:

Dowload it here


a-v-o

The problem isn't the new-room, because it works fine as long as you don't ask Grace about herself. After the topic is changed to topic 1 and then changed back to topic 0 the error occurs.

I suspected the goto-previous command in topic 1, so I changed it to goto-dialog 0, but it didn't help.

This seems to be a bug.

Workaround:
In Topic 1:
@6  // option 6
run-script 1

In global script:
function dialog_request (int parameter)
{
 if (parameter == 1) RunDialog (0);
}

Gilbert

Hmmmm I'd tried it, I think it's quite possibly a bug, my observation is that, when I chosed something after asking "herself", then "back" then "exit", it crashed with an "invalid message number" or whatever error (which was strange), if I ask "herself", don't choose anything, then  "back" then "exit", it wouldn't crash for the first few times, but crash with those exception message in the 3rd or the 4th time.

I'll make it a sticky to draw pumaman's attention, and see if it's indeed a bug (a memory leak perhaps) or just a false alarm.

Scorpiorus

The same for me. I got different error messages like error: prepare script script room_c(), error:DisplayMessage() wrong massage number, uknow new interaction or just an error without description. I also noticed the engine crashes someehere between leaving old entering new room, at least on_event function is called on leaving but doesn't have an opportunity to be call on entering.

~Cheers

buddha

Thanks guys for taking a look.

A-v-o: Even without asking Grace about herself I often get an error like 'unknown new interaction command' error when exiting. Even with the workaround I still got errors.

I'll just wait and see what Pumaman has to say about it


B.

Gilbert

Yep, just wait. :) He'll be back after 9th.

Pumaman

Thanks for the bug report, this is an odd one indeed.

It turns out that the crash happens if you use a new-room dialog script command inside a dialog which has been run from a "Game - Run dialog" room interaction command.

The bug does not happen if you initiate the dialog with the RunDialog script command or if you use a "Game - Run dialog" global interaction (eg. character / inventory).

I'll get it fixed. The workaround is to change your Enters Screen (After Fadein) interaction to "Run script", then type into the script:
RunDialog(0);

(Technical info for the interested - the interaction runner was trying to continue to run the rest of the interactions after the "Run dialog", but the room had been unloaded so it was causing an access violation, or reading random memory).

buddha

Thanx a lot for the explanation (I'll be able to sleep again tonight ;) ) and the workaround.
Everything works just fine with the workaround.  Thanx again!

B.

SMF spam blocked by CleanTalk