Two days ago I recompiled Shards of God in AGS 3.6.2.10. Today, I got this fatal crash report from a player:
(https://img.itch.zone/aW1nLzIxNDUxNTYwLnBuZw==/original/AN5oJq.png)
I replicated the crash and found out it's caused by a simple "player.FaceDirection (eDirectionUp);" line of code - if I remove this line, the game proceeds normally. There wasn't an issue with this in the previous version of the engine (3.6.0.50), and I haven't made any changes to the game, I only recompiled it.
For a bit more context, the line is in a room script, in a function which is triggered by looking at a dead body:
function open_victim_detail ()
{
player.Walk (130, 195, eBlock);
player.FaceDirection (eDirectionUp); // This is what crashes the game
gui_fade ("in", gBody);
}
function oVictim_Look()
{
open_victim_detail ();
}
every time this has happened to me its because the character is using a view that doesn't have an up loop
walk can live with that, face can't
This is not a regular "missing loop" error, this is a unhandled exception in the engine, which must not happen.
Quote from: FortressCaulfield on Fri 30/05/2025 21:44:00every time this has happened to me its because the character is using a view that doesn't have an up loop
walk can live with that, face can't
Just to be triple-sure, I tried replacing the line with "player.Loop = 3;" and it works.
Quote from: Crimson Wizard on Fri 30/05/2025 21:51:40This is not a regular "missing loop" error, this is a unhandled exception in the engine, which must not happen.
I have gotten this error from missing loops, or at least, similar situations with facedirection which were all fixed by addressing the loop issue. In fact I don't think I've ever seen a missing loop error, just this.
A character only had a right-facing idle but can face left or right to talk. If I talked to her from the left while idling, it called facedirection to turn her left and I got an unhandled exception. I'll start documenting those if I see more.
If engine displays a message with "Illegal exception" in the title, and similar structure ("An exception 0xxxxx" occured..."), that's a bad error in the engine, not a game's mistake. Please report such errors as AGS bugs.
@Honza I cannot reproduce this problem with your script alone. There must be something in the game's setup that contributes to this.
Since I've already got your game earlier, could you tell how do I get to this scene and reproduce this error?
(or, do you have any save made just before this?)
Quote from: Crimson Wizard on Fri 30/05/2025 23:03:29@Honza I cannot reproduce this problem with your script alone. There must be something in the game's setup that contributes to this.
Since I've already got your game earlier, could you tell how do I get to this scene and reproduce this error?
(or, do you have any save made just before this?)
This is a different game (Shards of God (https://www.adventuregamestudio.co.uk/play/game/2680/)). I'll send you a download link including the save.
It turned out that the crash was caused by reading Character.DestinationX or DestinationY property while character is turning to face location.
The new temp build with a fix will be available here:
https://cirrus-ci.com/task/5641890608971776
Quote from: Crimson Wizard on Sat 31/05/2025 03:51:34It turned out that the crash was caused by reading Character.DestinationX or DestinationY property while character is turning to face location.
The new temp build with a fix will be available here:
https://cirrus-ci.com/task/5641890608971776
Great, it doesn't crash anymore. Thank you!