[Scummvm-tracker] [ScummVM :: Bugs] #14876: Full Throttle first bike fight crash

ScummVM :: Bugs trac at scummvm.org
Fri Jan 19 16:59:04 UTC 2024


#14876: Full Throttle first bike fight crash
-------------------------+----------------------------
Reporter:  mikkelangaju  |       Owner:  (none)
    Type:  defect        |      Status:  new
Priority:  normal        |   Component:  Engine: SCUMM
 Version:                |  Resolution:
Keywords:                |        Game:  Full Throttle
-------------------------+----------------------------
Comment (by antoniou79):

 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) {

 }}}
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/14876#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list