[Scummvm-tracker] [ScummVM] #10747: QFG4: Pathfinding crash when walking around the squid monolith

Vhati trac at scummvm.org
Fri Nov 9 15:46:15 CET 2018


#10747: QFG4: Pathfinding crash when walking around the squid monolith
--------------------------------+-------------------------
  Reporter:  Vhati              |      Owner:  (none)
      Type:  defect             |     Status:  new
  Priority:  normal             |  Component:  Engine: SCI
Resolution:                     |   Keywords:  SCI32
      Game:  Quest for Glory 4  |
--------------------------------+-------------------------

Comment (by Vhati):

 ''backtrace''
 {{{
 script 64992 - Motion::init(); pc=0017:0456
 script 64998 - hero::setHeading(0000:004e); pc=0006:0f31
 script 28 - stopGroop::doit(hero, 0000:004e, 0); pc=0013:01b12
 script 64977 - Grooper::doit(hero, 0000:004e, 0); pc=0015:022e
 script 64998 - hero::setCycle(Grycler, stopGroop, 0000:0002); pc=0006:06af
 script 64977 - Grycler::init(hero, stopGroop, 0000:0002); pc=0015:0309 is
 the crashing opcode
 }}}
 \\
 \\
 Stepping through until it crashes...
 {{{
 # Indented to match each send with its pushes.

 0015:02f3: 38 96 00       pushi 0096            ; isKindOf
 0015:02f6: 78             push1
 0015:02f7: 51 59          class StopWalk[59],
 0015:02f9: 36             push

         0015:02fa: 38 47 02       pushi 0247            ; oldCycler
         0015:02fd: 76             push0

                 0015:02fe: 39 47          pushi 47              ; looper
                 0015:0300: 76             push0
                 0015:0301: 63 14          pToa  client[14]      (client)

                 0015:0303: 4a 04 00       send  0004
                   hero::looper[VAR]()

         0015:0306: 4a 04 00       send  0004
           stopGroop::oldCycler[VAR]()

 0015:0309: 4a 06 00       send  0006
   <no such object>::isKindOf[INVALID_OBJ](StopWalk)

 lookupSelector: Attempt to send to non-object or invalid script.
 Address 0000:0000, method Grycler::init (room 800, script 64977, localCall
 ffffffff)!
 }}}

 At that moment, hero's "looper" property is stopGroop.
 stopGroop's "oldCycler" property is 0000:0000.
 \\
 \\
 Grycler::init()
 {{{
         (method (init param1 theCaller theLoopIndex)
                 (super init: param1)
                 (= caller theCaller)
                 (= numOfLoops (if (< (NumLoops client) 8) 4 else 8))
                 (= cycleDir
                         (-
                                 (proc64999_0
                                         (proc64982_2 (* theLoopIndex 45)
 (param1 heading?))
                                 )
                         )
                 )
                 (= loopIndex theLoopIndex)
                 (if (self loopIsCorrect:)
                         (if
                                 (and
                                         (((client looper?) oldCycler?)
 isKindOf: StopWalk)
                                         (== (((client looper?) oldCycler?)
 vStopped?) -1)
                                 )
                                 (client loop: [local8 loopIndex])
                         )
                         (self cycleDone:)
                 )
         )
 }}}

--
Ticket URL: <https://bugs.scummvm.org/ticket/10747#comment:4>
ScummVM <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list