Bug Report - crash when *running* game

Started by Ali, Tue 18/12/2012 22:34:30

Previous topic - Next topic

Ali

For the past few days I've been getting this error quite frequently when compiling (Running 3.2.1):

An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0044EF47 ; program pointer is -1893, ACI version 3.21.1115, gtags (159,135)

It crashes, and then after that it never successfully compiles until I restart my computer. Other programs run very slowly sometimes too, even after quitting AGS.

Can anyone help? It's getting annoying to have to keep restarting!

Crimson Wizard

#1
Are you sure this happens when compiling? ACWIN.exe is the engine... May that be game is already starting?
Does this error occur if you use "Build EXE" option, or only if you use "Run" (F5)?

Program pointer -1893 is related to GetDiskFreeSpaceMB() function in the engine, which itself is being called when checking write access in the game's directory (at game start) and also from save game routine.
Is your project located at "common" place?
Do you have any kind of custom autosave function called from script at the game's start?

Did that start happening just out of blue, could be you were relocating your project to another place on disk, other machine, etc?

Ali

#2
You're right - it happens when launching the game, not compiling.

I'm starting to wonder if it's my computer or AGS. It takes longer and longer to load the game, until eventually it crashes. After that everything is massively slow until I restart, but I can't identify memory being allocated to anything in particular. I haven't seen this problem with other software, only AGS and only recently. I haven't moved anything recently, I just came back to working with AGS after a month or two away.

The games I've tried it with are all in My Documents on Win7. There's no autosave function as far as I remember. I do have free disk space on that drive... any ideas?

Crimson Wizard

Hard to say, really. Could be virus. Or something screwed up in the system.

In regard to AGS: did you manually set up saved games directory in Global Settings? If yes, what is it?
Does this error happen if you run the compiled game outside the editor? If you put it in some other folder (other disk partition)?

In regard to computer: did you install any utility software or system components lately?

Ali

I haven't installed anything very recently, and I did a full viras scan (Kaspersky) overnight which found no problems. I've been working with Photoshop and Flash a lot recently with no problems, but when I switch over to AGS it starts.

I haven't manually set up a saved game directory. However the crash does occur when launching outside AGS - *after* I've been working in the editor. Basically it feels like every time I run the game the computer becomes a degree slower, the game takes longer to launch, until it and crashes and remains painfully slow until I restart.

I can experiment when I'm home tonight - but do you have any idea what I should try to pin down the cause?


Crimson Wizard

I could suggest to reinstall something, like .Net Framework or Visual C++ Redistributable (or AGS), but that would be blind shots.

I may also make a custom build from CJ's sources with more checks added, hoping that it let locate the moment of crash more precisely and give some ideas...

Ali

Well, I'm getting very confused. I'm turning into one of those people who says, 'AGS is BOKEN PLZ FIX MY COMPUTER!'...

I've validated my installation of .Net Framework and reinstalled AGS. Incidentally, I didn't think compiled games used the net framework? I have about a dozen different Visual C++ Redistributables listed, and there seem to be many variations available - if you know a good way of re-installing that please let me know. I have no problem running intensive programs like Photoshop or Blender simultaneously so I don't think it's a more general problem. I've tried moving the launch folder out of My Documents, and the problem still occurs.

The crash occurs when loading the game. It doesn't happen every time, but it's happened with two games I've compiled in the last week or so. It doesn't seem to happen with games I compiled in the past, or other AGS games. The crash sometimes happens even if I have not been running the editor.

It begins by the game taking AGES to load. If I do absolutely nothing, the game usually loads correctly after a minute or two. If I click away to browse the forums, or do anything else, it crashes. When it crashes the window displays off the top-left corner of the screen instead of centrally - I don't know if that's relevant.

The worst thing about the problem is, after the crash everything becomes very sluggish. After several crashes even simple operations like opening Chrome or Filzip become excruciatingly slow.

I just want to make retro adventure games! Would uploading a crashdump help?

Crimson Wizard

#7
Quote from: Ali on Fri 21/12/2012 00:11:08
I've validated my installation of .Net Framework and reinstalled AGS. Incidentally, I didn't think compiled games used the net framework?
They don't, but I thought that maybe it's related to editor...
I want to make this clear: does this ever happen if you don't run editor at all (after reboot)?

Quote from: Ali on Fri 21/12/2012 00:11:08
I have about a dozen different Visual C++ Redistributables listed, and there seem to be many variations available - if you know a good way of re-installing that please let me know.
A dozen?? hmm... That's either 2005 or 2008 I guess. But, thinking about this again, I am not sure AGS requires it. Not game executables at least.

Quote from: Ali on Fri 21/12/2012 00:11:08
Would uploading a crashdump help?
Unfortunately I can't use crash dump made by official AGS version, the reason is explained here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47162.0
I made another build, it should be identical by behavior, except it writes some extra stuff to "warnings.log". Also I can use its crash dumps.
How to use:
- download: http://www.mediafire.com/?x91x7j3t9octmh5
- make a backup of "acwin.exe" that lies in your editor's folder.
- copy my "acwin.exe" there.
- run editor, compile and run the game until crash happens.
- upload crash dump and "warnings.log" (from game's "Compiled" folder)

Also, I made some tests, and I am almost certain this happens when AGS makes restart point at the very start of the game (this is because "gtags" numbers in error message are not 0).

Ali

Thanks for your help!

Quote from: Crimson Wizard on Fri 21/12/2012 07:50:37
They don't, but I thought that maybe it's related to editor...
I want to make this clear: does this ever happen if you don't run editor at all (after reboot)?

Yes it has crashed once after a reboot without me running the editor at all.

After a few launches with your editor it gave the usual crash:
An exception 0xC0000005 occurred in ACWIN.EXE at EIP = 0x0044CBD7 ; program pointer is -1893, ACI version 3.21.1115, gtags (159,135)
Here's the log:
http://ali.agser.me/warnings.log
Here is the crashdump:
http://ali.agser.me/CrashInfo.3.21.1115.dmp

Crimson Wizard

#9
I am sorry, can you repeat this, but running the game in a different way:
- copy the new acwin.exe to the folder where your Nelly.exe is located;
- run from command line: "acwin.exe Nelly.exe"


Actually, nevermind.
To be honest, I am having some problems using this dump... but it has to work... (when I intentionally crashed my game, it did work).
I will experiment more with this.

Ali

Just in case, I ran it through the command line like you asked. Here's the crashdump:

http://ali.agser.me/CrashInfo.3.21.1115_new.dmp

Crimson Wizard

#11
Hey, that actually worked!

Now I am going to investigate what happened there.

(NOTE: I think I just needed your game's executable to make the previous dump work properly)

E: This seem to be related to creating screenshot when saving the game. Hm..... looking further.

Crimson Wizard

#12
The crash dump shows some of the program state at the moment of crash, but unfortunately it does not let you know how did program get into that state.
What I see there is very strange. Basically, there's a screen buffer, and it looks like it wasn't created. Also game's color depth set to 0 for some reason, like the graphics were not properly initialized.

I noticed the game is run in 1600x1200 resolution. I don't think that's actual game's resolution, is it? Will the crash happen if you run it in smaller res?

I made another build with extra log output. Can you use it to get a new log?
http://www.mediafire.com/?xz1nm438tjfw76j

Also, I forgot to ask, have you tried to run your game on other computer?

Ali

#13
Sorry for the very delayed response - I was visiting my parents over Christmas and New Year and their internet was broken.

Here's the new crashdump:
http://ali.agser.me/CrashInfo.3.21.1115_v3.dmp

And the warning log:
Quote(in room -10): check_write_access -- before GetDiskFreeSpaceMB
(in room -10): check_write_access -- after GetDiskFreeSpaceMB - success
(in room -10): init_engine: before switch_to_graphics_mode: final_col_dep = 0
(in room -10): switch_to_graphics_mode, start: final_col_dep = 0
(in room -10): try_widescreen_bordered_graphics_mode_if_appropriate, start: final_col_dep = 0
(in room -10): init_gfx_mode: final_col_dep = 32
(in room -10): try_widescreen_bordered_graphics_mode_if_appropriate, start: final_col_dep = 32
(in room -10): switch_to_graphics_mode, end: final_col_dep = 32, failed = 0
(in room -10): init_engine: after switch_to_graphics_mode: final_col_dep = 32
(in room -10): initializing engine: creating new virtual screen: w = 640, h = 400, cd = 32
(in room -10): virtual_screen = 05B06E88
(in room -10): save_game -- slotn = 999, descript = 5704708
(in room -10): save_game -- before GetDiskFreeSpaceMB
(in room -10): save_game -- after GetDiskFreeSpaceMB - success
(in room -10): save_game -- before get_save_game_path
(in room -10): save_game -- after get_save_game_path
(in room -10): save_game -- after open file
(in room -10): save_game -- prepare to save screenshot
(in room -10): virtual_screen = 05B06E88, width = 640, height = 400, vs color depth = 32, final color depth = 32

In answer to your queries - the game is not set to run at 1600x1200, that's the resolution of my desktop. The game is 640x480 windowed.

A few people have tested recent versions, and no one has reported this error. If you PM me your email address I can share the latest build with you, if that would help?

Thanks for your help! Please let me know if you can make any sense of this...

EDIT:
I don't know if this helps, but I'm occasionally getting this crash (in this case, after the first):

Quote
There was a problem initializing graphics mode 640 x 480 (32-bit).
(Problem: 'Failed to create Direct3D Device: 0x8876086C')
Try to correct the problem, or seek help from the AGS homepage.

Possible causes:
* your graphics card drivers do not support this resolution. Run the game setup program and try the other resolution.
* the graphics driver you have selected does not work. Try switching between Direct3D and DirectDraw.
* the graphics filter you have selected does not work. Try another filter.

Another Edit:

A weird thing just happened. I ran the game and it acted like it was going to crash, but after ages it loaded... in full screen instead of a window. It is definitely set to run in a window. The CFG file reads: windowed=1.

I am baffled. Is my computer haunted?

SMF spam blocked by CleanTalk