Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: geork on Tue 28/05/2013 02:30:26

Title: Another Unhandled Exception 0xC0000005 on DynamicSprite call
Post by: geork on Tue 28/05/2013 02:30:26
Hello Everyone!

I have encountered a curious error whereby my game crashes when it encounters the following code:
Code (AGS) Select
sMenu = DynamicSprite.CreateFromScreenShot();
sMenu.Tint(0, 64, 128, 50, 75);


Where sMenu is a Dynamic Sprite. It is deleted at points, but whether it is deleted or not before the above usage comes in the game always freezes up and gives me a CrashInfo3.21.1115NMP.DMP file.

The exception information: "The thread tried to read or write to a virtual address for which it does not have the appropriate access"

However, this ONLY happens when I run the game from the .exe - in the editor this line executes fine and nothing goes wrong.

Also, as I said before, the game freezes, doesn't crash (actually managing to lock up mouse controls at one point). I have to open the .DMP file with VisualStudio C++ (although that may be my default programs taking over).

Does anyone know what could be causing this?

Thanks again!
Title: Re: Another Unhandled Exception 0xC0000005 on DynamicSprite call
Post by: Crimson Wizard on Tue 28/05/2013 08:19:14
Geork, we cannot use dumps from 3.2.1.1115 unfortunately, because we do not have matching debug symbols for that program (only CJ has, maybe).
Will you be able to download 3.3.0 beta and run your game with "acwin.exe" as explained in "Backward Compatibility" section here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=47966.0 ?

E: As an option you may make a copy of your game project, and build it in 3.3 editor, then run the game itself, but in that case I would need your game exe to read the dump.
Title: Re: Another Unhandled Exception 0xC0000005 on DynamicSprite call
Post by: geork on Tue 28/05/2013 13:50:09
Hello Crimson

I built the game in the 3.3 editor and got the same problem, only the name of the .dmp file changed to reflect the version I was using.

However, as this issue seemed to have been cause in the past by corrupted mp3 files, I removed all the mp3 files, and the game no longer crashed. It seems weird though, since the game ran along happily until it hit the line I mentioned; it seemed to take issue with the command.
Code (AGS) Select
DynamicSprite.CreateFromScreenShot();
I don't know if this information helps find a bug - but it seems like corrupted sound files cause trouble wherever they go.

Thanks again!
Title: Re: Another Unhandled Exception 0xC0000005 on DynamicSprite call
Post by: Crimson Wizard on Tue 28/05/2013 13:53:57
This sounds like memory corruption, such things tend to trigger problems at seemingly random places, all depends on how program objects are positioned in computer memory.

Can you maybe share one of those mp3 files that caused that?
Title: Re: Another Unhandled Exception 0xC0000005 on DynamicSprite call
Post by: geork on Wed 29/05/2013 19:58:21
Hello Crimson

I don't know exactly if it was just a few mp3 files that corrupted, or whether it was all of them - but taking the sounds out in different orders didn't effect anything until they were all gone... Here's one of them.

    https://www.dropbox.com/s/qefiwbqxz43i984/au000001.mp3

As an update; it seems as if taking the sounds out in the AGS 3.21.1115 editor does not fix the problem - it has to be done in the 3.3.0.1132 version.

Thanks again!