[Scummvm-tracker] [ScummVM :: Bugs] #15539: SCUMM: HE: Assertion error crash in Spy Fox 2 "Things From Space" minigame

ScummVM :: Bugs trac at scummvm.org
Sun Dec 1 10:09:09 UTC 2024


#15539: SCUMM: HE: Assertion error crash in Spy Fox 2 "Things From Space" minigame
-------------------+----------------------------
Reporter:  joeraz  |       Owner:  (none)
    Type:  defect  |      Status:  new
Priority:  normal  |   Component:  Engine: SCUMM
 Version:          |  Resolution:
Keywords:          |        Game:  Spy Fox 2
-------------------+----------------------------
Comment (by AndywinXp):

 Great find! This happens because the game is trying to load a bunch of
 images which have resource id equal to 0. This is allowed in the original
 and effectively yields a valid image file.

 We disallow it because of this piece of code in
 `ScummEngine::ensureResourceLoaded()`:


 {{{
         // FIXME: This check used to be "idx==0". However, that causes
         // problems when using this function to ensure charset 0 is
 loaded.
         // This is done for many games, e.g. Zak256 or Indy3 (EGA and
 VGA).
         // For now we restrict the check to anything which is not a
 charset.
         // Question: Why was this check like that in the first place?
         // Answer: costumes with an index of zero in the newer games at
 least.
         // TODO: determine why the heck anything would try to load a
 costume
         // with id 0. Is that "normal", or is it caused by yet another bug
 in
         // our code base? After all we also have to add special cases for
 many
         // of our script opcodes that check for the (invalid) actor 0...
 so
         // maybe both issues are related...
         if (type != rtCharset && idx == 0)
                 return;
 }}}

 It's not clear to my why this piece of code is here... I'll investigate
 and then let you know.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15539#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list