Opened 4 months ago

Closed 4 months ago

#14876 closed defect (fixed)

Full Throttle first bike fight crash

Reported by: mikkelangaju Owned by: antoniou79
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Full Throttle

Description

Version: ScummVM 2.8.0
Have also tried daily build:
ScummVM 2.9.0git1611-gca75845db82 (Jan 18 2024 12:42:14)
Using SDL backend with SDL 2.0.14
Features compiled in: TAINTED Vorbis FLAC MP3 RGB zLib MPEG2 FluidSynth MikMod Theora VPX AAC A/52 FreeType2 FriBiDi JPEG PNG GIF taskbar TTS cloud (servers, local) ENet SDL2 TinyGL OpenGL (with shaders) RetroWave

Full Throttle (Version B/English) extracted from Steam version of Full Throttle Remastered using Double Fine Explorer.
Platform: Windows 10 Home 64bit and Nintendo Wii homebrew.

The crash happens right as the other biker tries to hit you. I have attached a savegame right before the two cutscenes.

Attachments (1)

ft.s00 (24.9 KB ) - added by mikkelangaju 4 months ago.

Download all attachments as: .zip

Change History (5)

by mikkelangaju, 4 months ago

Attachment: ft.s00 added

comment:1 by antoniou79, 4 months ago

The following is my hypothesis, based on similar crashed I've got in that scene.

It seems that, when the subtitles files are missing from the localized folders (depending on the language of your choice, but I haven't tested with anything other than English, and the "classic" version extracted does explicitly specify it's the English one), then you'll get a crash at that scene.

It's kind of easy to miss these files, if you are to play with a classic version that was extracted from the Remastered version.

So, when dumping all files using the Double Fine Explorer to a directory (eg. for this example: "C:\dumped"), you will get the "classic" folder and the "DATA" and "VIDEO" folders within C:\dumped. You have to copy (or move) these "DATA" and "VIDEO" folders under "C:\dumped\classic\en". But also, there will be an "EN" folder within "C:\dumped" which will contain two other "DATA" and "VIDEO" folders. These "DATA" and "VIDEO" folders should be copied (or moved) within "C:\dumped\classic\en" as well, where they will be *merged* with the previous "DATA" and "VIDEO" folders you copied, or you will be missing files and you'll get the crash.

I think the specific culprit file for this crash is the DATA\MINEROAD.TRS.

An easy tell that you're missing files is that, if you have subtitles on, you won't have subtitles when characters are talking during the road encounter, and chances are you won't have subtitles in the cutscene that precedes the fight ("When I'm on the road...") -- but that's a different subtitles file (which should reside in the VIDEO folder).

A (naive?) patch that I could come up with by setting null pointer guards wherever debugging (through Visual Studio) threw exception errors is this:

diff --git a/engines/scumm/insane/insane.cpp b/engines/scumm/insane/insane.cpp
index cf9bfe85a29..0184fc969ea 100644
--- a/engines/scumm/insane/insane.cpp
+++ b/engines/scumm/insane/insane.cpp
@@ -1383,7 +1383,9 @@ void Insane::smlayer_setActorFacing(int actornum, int actnum, int frame, int dir

 const char *Insane::handleTrsTag(int32 trsId) {
        debugC(DEBUG_INSANE, "Insane::handleTrsTag(%d)", trsId);
-       return _player->getString(trsId);
+       if (_player != nullptr) {
+               return _player->getString(trsId);
+       } else return 0;
 }

 bool Insane::smush_eitherNotStartNewFrame() {
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 211c6801f23..7900ce87da4 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -669,7 +669,9 @@ void SmushPlayer::handleTextResource(uint32 subType, int32 subSize, Common::Seek
 }

 const char *SmushPlayer::getString(int id) {
-       return _strings->get(id);
+       if (_strings != nullptr) {
+               return _strings->get(id);
+       } else return 0;
 }

 bool SmushPlayer::readString(const char *file) {

comment:2 by mikkelangaju, 4 months ago

You are absolutely correct. After adding the data and video folders from the EN folder it now doesn't crash and I have text lines in cutscenes as well.
Maybe this information could be put in the wiki page for the game?

comment:3 by antoniou79, 4 months ago

I've added a note in the wiki page for this case.

The patch is merged too, and that should indicate to users that they're maybe missing subtitle files without crashing the game.

comment:4 by antoniou79, 4 months ago

Owner: set to antoniou79
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.