Game Crash on Moving Objects [SOLVED]

Started by TheJBurger, Thu 09/12/2010 07:36:53

Previous topic - Next topic

TheJBurger

I've been getting crashes from normal playthroughs performing actions that I've done many times before but which have never resulted in crashes.

The crashes seem to recur on incidents of object[].Move(); commands, but I've never changed anything about these lines recently at all.

One instance is when the player is trying to open an elevator and the object slides open. The crash happens recurrently in one scene, but when I open the elevator later in the game, it doesn't crash at all:
Code: ags

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00423560 ; program pointer is +77, ACI version 3.20.1110, gtags (30,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

in "room50.asc", line 152


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

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------

Code: ags

Line 152: oElevatorRight2.Move(225, 140, -10, eNoBlock, eAnywhere);



Another instance is when a player is moving an object by pressing "A" on the keyboard, and then the game crashes. Again, the code has not been changed in recent memory, yet the game now crashes with the same line.

Code: ags

---------------------------
Illegal exception
---------------------------
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x00423560 ; program pointer is +6, ACI version 3.20.1110, gtags (30,0)

AGS cannot continue, this exception was fatal. Please note down the numbers above, remember what you were doing at the time and post the details on the AGS Technical Forum.

in "room17.asc", line 414


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

An error file CrashInfo.dmp has been created. You may be asked to upload this file when reporting this problem on the AGS Forums. (code 0)
---------------------------
OK   
---------------------------


Code: ags

Line 414:     oBox.Move(oBox.X+1, oBox.Y, 0, eNoBlock, eAnywhere);


It only started happening today and with multiple instances in the code, where there were never any problems before.

Any thoughts?

Gilbert

Just a quick check and may not be of help. Would it be possible that the objects' views containing frames that point to non-existing sprites?

TheJBurger

Quote from: Gilbet V7000a on Thu 09/12/2010 08:38:04
Just a quick check and may not be of help. Would it be possible that the objects' views containing frames that point to non-existing sprites?

Hmm... don't think so. The objects themselves are not locked to any views. They are just called using the object.Move(); command.

Gilbert

Hmmm, will the game crash if you comment those lines out? The engine may report the incorrect lines sometimes.

TheJBurger

#4
Quote from: Gilbet V7000a on Thu 09/12/2010 08:53:02
Hmmm, will the game crash if you comment those lines out? The engine may report the incorrect lines sometimes.

I commented those lines out and the game does not crash. But that only works as a temp solution, unfortunately.

---

I noticed that the game is crashing in specifically 4 different rooms when any object is moved.

What those 4 rooms have in common is that they all have a "BOX" object in them -- in the game there exist little "box moving" sequences where the player can interact with a oBox and use the keyboard to move it around.

All 4 rooms have the same Box moving code in the key_press section but some use different graphics for the box, I believe. In those rooms, it seems that any time an object is moved (box or not) the game crashes.

In a later scene where the box is not visible, an object.Move() command is called, and the game does NOT crash. So it seems to be dependent on the BOX being visible somehow?

Gilbert

Hmmm. That's odd. Have you tried rebooting the system? maybe the system becomes unstable or has a memory leak or something like that?

TheJBurger

I tried restarting my computer multiple times, yet the game still crashes. Although I was playing Left 4 Dead 2 earlier and Windows told me I was low on System Memory.

I tried it on a friend's computer and it does not crash, so I guess it is the system's fault. Shouldn't restarting my computer though fix any memory leak issues?

tzachs

I have no idea why it happens, but maybe you should try using another way to perform the Move, for instance using the TweenPosition of the Tween Module, and see if that solves the problem...

Pumaman

Hmm, that's annoying that it doesn't crash on your friend's computer. If you'd like to upload the game I can try it out and see if it crashes for me, but if not it can be very hard to track these things down.

TheJBurger

Quote from: Pumaman on Mon 03/01/2011 17:06:35
Hmm, that's annoying that it doesn't crash on your friend's computer. If you'd like to upload the game I can try it out and see if it crashes for me, but if not it can be very hard to track these things down.

I used a work-around by Tweening (via the Tween Module) the objects which prevented the crashes, but I think the game also may have crashed under other odd circumstances, such as pressing Ctrl-A in debug mode (to view walkable areas).

I transferred my files over to a newer, faster, PC, and none of the old crashes happen. However, another person tried to play the game on their computer (with the old version) and it still crashed, so I don't think the crashing was unique to my old system, if that makes any sense.

Would uploading the current build (w/ Tween implemented) be of any use?

Pumaman

If the current build doesn't crash, it probably wouldn't be of use.

If it's easy to make it crash again on your PC by taking the tweening out, then that could be handy though.

TheJBurger

Quote from: Pumaman on Mon 03/01/2011 23:21:33
If the current build doesn't crash, it probably wouldn't be of use.

If it's easy to make it crash again on your PC by taking the tweening out, then that could be handy though.

It depends on the computer -- if I take the tweening out on my current PC (the newer one), it doesn't cause any crashing as the crashing no longer exists, with or without the tween.

I think one thing that did crash the game on my old computer, apart from the tween, is also what I mentioned earlier, CTRL-A in Debug mode.

TheJBurger

Pumaman, I sent you a PM with details on how to replicate the crash in an uploaded version of the game.

Please let me know that you got it, thanks!

Pumaman

Thanks for posting a reproducible test case!

I have investigated this and found the cause of the problem. It looks like this bug has been in AGS all along, and explains why occasionally people have reported random crashes moving objects. So thanks again for isolating it!

Try this patch:
http://www.adventuregamestudio.co.uk/acwin.zip
unzip this, and copy the acwin.exe to replace the version in your AGS Editor folder.

Then, rebuild your game and the bug should be gone. (Press Ctrl+V in the game to double check that you have the new 3.21.1111 version).

This patch should also fix the crash with backgroundless GUIs that some people have reported in 3.2.


SMF spam blocked by CleanTalk