[Scummvm-tracker] [ScummVM :: Bugs] #15336: SCI: KQ6: ScummVM closes when trying to load a game save

ScummVM :: Bugs trac at scummvm.org
Tue Aug 27 08:13:52 UTC 2024


#15336: SCI: KQ6: ScummVM closes when trying to load a game save
-----------------------+-----------------------------
Reporter:  domino1983  |       Owner:  (none)
    Type:  defect      |      Status:  new
Priority:  normal      |   Component:  Engine: SCI
 Version:              |  Resolution:
Keywords:              |        Game:  King's Quest 6
-----------------------+-----------------------------
Comment (by eriktorbjorn):

 It seems that before the transformation, the kDoSoundPause() function is
 called four times. Each call increases `_globalPause` by 1.

 When restoring the game, if you're using the ScummVM dialogs
 `kRestoreGame()` will call `resetGlobalPauseCounter()`, which asserts that
 `_globalPause` is 1, not 4.

 If you're using the original dialogs, `resetGlobalPauseCounter()` is not
 called, and after you've loaded the savegame `_globalPause` is still 4. If
 you wait again for the transformation, `_globalPause` will become 8, and
 so on.

 This is the SCI call stack the first time `kDoSoundPause()` is called:

 {{{
 Call stack (current base: 0x0):
  0: script 994 - Kq6::replay()
      obj at 0001:1f4d pc=000a:045f sp=ST:0001 fp=ST:0000 argp:ST:0001
  1: script 994 - Kq6::doit()
      by 0 obj at 0001:1f4d pc=000a:05b6 sp=ST:0006 fp=ST:0003 argp:ST:0002
  2: script 999 - timers::eachElementDo(0000:0039)
      by 1 obj at 000a:10ca pc=0005:0474 sp=ST:000c fp=ST:0009 argp:ST:0007
  3: script 0 - beastTimer::doit()
      by 2 obj at 0001:22c5 pc=0001:1af4 sp=ST:000e fp=ST:000e argp:ST:000d
  4: script 973 - Timer::doit()
      by 3 obj at 0001:22c5 pc=0010:0126 sp=ST:0011 fp=ST:0010 argp:ST:000f
  5: script 973 - call 68 ()
      by 4 obj at 0001:22c5 pc=0010:00a1 sp=ST:0013 fp=ST:0012 argp:ST:0011
  6: script 907 - ring::cue()
      by 5 obj at 002c:3f5d pc=002c:2590 sp=ST:0015 fp=ST:0015 argp:ST:0014
  7: script 900 - rm250::setScript(0107:0368)
      by 6 obj at 0109:16b1 pc=0019:02b5 sp=ST:0019 fp=ST:0018 argp:ST:0016
  8: script 994 - Rm::setScript(0107:0368)
      by 7 obj at 0109:16b1 pc=000a:0b7a sp=ST:001c fp=ST:001c argp:ST:001a
  9: script 999 - egoBeastScript::init(0109:16b1)
      by 8 obj at 0107:0368 pc=0005:0755 sp=ST:001f fp=ST:001f argp:ST:001d
  a: script 999 - egoBeastScript::cue()
      by 9 obj at 0107:0368 pc=0005:0803 sp=ST:0021 fp=ST:0021 argp:ST:0020
  b: script 84 - egoBeastScript::changeState(0000:0000)
      by a obj at 0107:0368 pc=0107:0034 sp=ST:00ee fp=ST:0024 argp:ST:0022
  c: script 0 - Kq6::killSound(0000:0001)
      by b obj at 0001:1f4d pc=0001:117c sp=ST:00f3 fp=ST:00f3 argp:ST:00f1
  d: script 999 - Sounds::eachElementDo(0000:00af, 0000:0001)
      by c obj at 000a:1076 pc=0005:0474 sp=ST:00fa fp=ST:00f7 argp:ST:00f4
  e: script 989 - globalSound::pause(0000:0001)
      by d obj at 0001:1e2b pc=0004:0140 sp=ST:00fd fp=ST:00fd argp:ST:00fb
 }}}

 Subsequent calls appear to be the same, except the last line will refer to
 `globalSound2`, `globalSound3` and `globalSound4`.

 I hope this means something to someone, because it means very little to
 me.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15336#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list