Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bauldur_rises on Tue 10/01/2023 05:46:47

Title: AGS crashes when attempting to run game
Post by: bauldur_rises on Tue 10/01/2023 05:46:47
Just recently, when I attempt to run the game from AGS, the messages mention something about the script being changed and rebuilding from Room 1, which is pretty normal, but then AGS crashes, closing entirely.

There doesn't seem to be a recent crash dump or anything.  I created a template game and that was able to run properly, so I assume it's something I've done, but I have no idea how to determine the issue. 

Does anyone have any guidance?
Title: Re: AGS crashes when attempting to run game
Post by: Khris on Tue 10/01/2023 09:57:48
You mean like you're pressing F5 in the editor, and after the message, the editor crashes?
Have you tried pressing F7 instead? Then running the game from the Compiled folder?
Title: Re: AGS crashes when attempting to run game
Post by: bauldur_rises on Tue 10/01/2023 16:57:14
Yes, but it still crashes in the same way as it tries to compile.
Title: Re: AGS crashes when attempting to run game
Post by: Crimson Wizard on Tue 10/01/2023 17:01:26
Please tell, what is the version of AGS exactly you are using? This may be found in Help -> About menu.

Do I understand correctly, that there's no error message whatsoever, and the program just terminates?

Is it acceptable for you to upload your game project somewhere for AGS developers to test it? This may be done through PM on this forums, for example, and we promise that we won't distribute your game sources.

If not, we will need to think how to diagnose this problem...

Do you use any source control utility with your project (SVN, Git, and so forth)?  If yes, then you could go back in history and find a change which started causing this problem.

Alternatively, one solution (which may be quite slow) is:
1) make a full project backup
2) start removing rooms and scripts, until you reach a state at which it no longer crashes.
This will narrow the problem down a bit.

Title: Re: AGS crashes when attempting to run game
Post by: bauldur_rises on Wed 11/01/2023 05:05:02
So the version is Build 3.5.1.15, and yes, there is no error message or anything.

Unfortunately I'm not very experienced with coding or game development, so I'm not familiar with source control or anything.

I'm willing to share the game project, I'll PM you about it.

I'll also try to go through the removal process you describe.
Title: Re: AGS crashes when attempting to run game
Post by: Crimson Wizard on Thu 12/01/2023 12:45:35
I tried your game, and this crash is caused by the line
Code (ags) Select
import bool GUIControl* getAgentMarker(this Character*);
This line has a syntax mistake (bool followed by GUIControl*), but Editor crashes when trying to report the error.
This crash seem to be fixed in an updated 3.5.1 (see latest patch here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=60441.0).

Anyways, the correct line should probably be
Code (ags) Select
import GUIControl* getAgentMarker(this Character*);
Title: Re: AGS crashes when attempting to run game
Post by: bauldur_rises on Thu 12/01/2023 13:59:20
Such a stupid mistake, too! Thank you so much for your help.