Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: JpSoft on Tue 02/06/2009 12:22:31

Title: Crash when use Display
Post by: JpSoft on Tue 02/06/2009 12:22:31
Like part of a game I'm colaborating, one room is exclusively for a single arcade. Since it is a little complex, i created its own module (player moves, shot impacts, etc) The arcade works perfect until today when i included this

Display("I dont remember what, but something very simple like this");


I get confused the next time i test the game; it crashed, givin an error about it was imposible to allocate around ¡¡500 MB!! in the memory. I tried everything (even restarted the PC) but the game crashed always, but not inmediately after the display function; it continued until the final of the blocking sequence. I deleted the line and the game works perfect again. I tried including the line in other moment, but is absolutely imposible use the Display function in that room without get that error (Display works perfect in all the other rooms, more than 20) This was reported before? I checked the forums for a while and i dont see nothing.

Im using 3.1.2 SP1. The module uses some dynamicsprites functions for objects (health bars and so on) , but very simple ones (anyway, the dynamic sprites have 110x16 pixels maximum)  Also, the GUI for display commands is customized, but worked perfectly until today.

I found a little workaround for what i were doing, but since the pause system of the game is using a Display("Pause"), the game crashh after you pause the game.

Jp
Title: Re: Crash when use Display
Post by: Pumaman on Tue 02/06/2009 23:54:01
If you'd like to upload something that demonstrates the problem, I can take a look at it.
Title: Re: Crash when use Display
Post by: JpSoft on Thu 04/06/2009 11:13:43
I sent you the game via PM.

Jp
Title: Re: Crash when use Display
Post by: Pumaman on Sat 06/06/2009 23:30:10
Thanks for sending this. I have investigated it and found a bug in AGS where dynamic sprites cause the engine to malfunction if you have a mouse cursor with its sprite set to 0.

In your case you have Mouse Cursor 9 (UserMode2) with its Image set to 0. Change this to any other image (or delete the cursor) and that should fix your problem.
I'll get the bug fixed in the next version of AGS.
Title: Re: Crash when use Display
Post by: JpSoft on Sun 07/06/2009 16:16:50
Thanks for your help. It give me an idea about why im having
this troubles with screenshots in saved games
(http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37956.0). I will check it now.

Jp