Opened 3 years ago

Closed 3 years ago

#12422 closed defect (fixed)

AGS: The Adventures of Fatman - Game crashes before credits

Reported by: joeraz Owned by: dreammaster
Priority: normal Component: Engine: AGS
Version: Keywords:
Cc: Game:

Description

While The Adventures of Fatman can be completed to the end, it crashes right before running the end credits. This game appears to use the agsCreditz plugin.

For this test, I was using the 2007 edition of the game. I am attaching a savegame right before the ending - to complete the game, press button 3 (the one with the green slime around it), and watch the ending. The ending sequence plays fully, but the game crashes before playing the end credits or giving your final score.

Attachments (1)

theadventuresoffatman.003 (335.3 KB ) - added by joeraz 3 years ago.

Download all attachments as: .zip

Change History (2)

by joeraz, 3 years ago

Attachment: theadventuresoffatman.003 added

comment:1 by dreammaster, 3 years ago

Owner: set to dreammaster
Resolution: fixed
Status: newclosed

Okay, it's all sorted out. This was an interesting bug, that revealed a couple of problems.
1) The agscreditz in that version had a "isFinished" method for detecting if the credits scrolling was finished, rather than the "IsCreditScrollingFinished" that was present at the time I originally made the Black Cauldron remake.
2) I realized the crash was actually happening because the error method "quitprintf" doesn't exit in standalone AGS. It's used frequently throughout the codebase, and in this case, it was complaining that the roominst wasn't set (because of the missing plugin method), and because the quitprintf method exited when it shouldn't, it then proceeded to try and call a method on the non-existent roominst, and crashed
3) Because all calls to quitprintf are now fatal errors, I realised the ScummVM version could generate spurious error messages in certain games like Fatman, where the script that set the global "abort engine" flag still had following stuff.. depending on what happened until the end of the game "tick", any number of errors could likely be generated. So I've whacked in a bunch of extra abort engine flag checks to break out of the script execution immediately. We'll see if any further cases are needed as further testing is done.

Note: See TracTickets for help on using tickets.