[Scummvm-tracker] [ScummVM] #10736: AGI: Fan Game Biru Quest triggers an assertion

digitall trac at scummvm.org
Wed Oct 10 09:40:40 CEST 2018


#10736: AGI: Fan Game Biru Quest triggers an assertion
--------------------------+-------------------------
  Reporter:  raziel-      |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  normal       |  Component:  Engine: AGI
Resolution:               |   Keywords:
      Game:  AGI Fanmade  |
--------------------------+-------------------------

Comment (by digitall):

 Even if the fangame is badly written or contains dodgy resources, it
 should not cause an assertion from the backend graphics!

 Have replicated the issue and now have a backtrace:
 {{{
 #5  0x00005555556a559d in ModularBackend::copyRectToScreen
 (this=0x555555a19e70,
     buf=0x555556586f90, pitch=320, x=576, y=792, w=8, h=8) at backends
 /modular-backend.cpp:161
 #6  0x00005555555d853c in Agi::GfxMgr::copyDisplayRectToScreen
 (this=0x555556514a50, x=576,
     y=792, width=8, height=8) at engines/agi/graphics.cpp:319
 #7  0x00005555555db2ed in Agi::GfxMgr::drawCharacterOnDisplay
 (this=0x555556514a50, x=576,
     y=792, character=32 ' ', foreground=15 '\017', background=0 '\000',
     transformXOR=0 '\000', transformOR=0 '\000') at
 engines/agi/graphics.cpp:1182
 #8  0x00005555555daf8d in Agi::GfxMgr::drawCharacter (this=0x555556514a50,
 row=99, column=72,
     character=32 ' ', foreground=15 '\017', background=0 '\000',
 disabledLook=false)
     at engines/agi/graphics.cpp:1118
 #9  0x000055555560093a in Agi::TextMgr::displayCharacter
 (this=0x55555653a5f0,
     character=32 ' ', disabledLook=false) at engines/agi/text.cpp:320
 #10 0x00005555556007dc in Agi::TextMgr::displayText (this=0x55555653a5f0,
     textPtr=0x555555a00940 <Agi::TextMgr::stringWordWrap(char const*,
 short, short*, short*)::resultWrappedBuffer> "         QUEST",
 disabledLook=false) at engines/agi/text.cpp:290
 #11 0x00005555556006c2 in Agi::TextMgr::display (this=0x55555653a5f0,
 textNr=1, textRow=99,
     textColumn=72) at engines/agi/text.cpp:254
 #12 0x0000555555619ad2 in Agi::cmdDisplay (state=0x55555657f5a8,
 vm=0x55555657f500,
     parameter=0x7ffffffb7d54 "cH\001") at engines/agi/op_cmd.cpp:2124
 #13 0x000055555561a9a7 in Agi::AgiEngine::runLogic (this=0x55555657f500,
 logicNr=1)
     at engines/agi/op_cmd.cpp:2413
 #14 0x000055555561653a in Agi::cmdCall (state=0x55555657f5a8,
 vm=0x55555657f500,
     parameter=0x7ffffffb7e55 "\001") at engines/agi/op_cmd.cpp:1122
 #15 0x00005555556165eb in Agi::cmdCallF (state=0x55555657f5a8,
 vm=0x55555657f500,
     parameter=0x7ffffffb7eb4 "") at engines/agi/op_cmd.cpp:1133
 #16 0x000055555561a9a7 in Agi::AgiEngine::runLogic (this=0x55555657f500,
 logicNr=0)
     at engines/agi/op_cmd.cpp:2413
 #17 0x000055555560dc9e in Agi::AgiEngine::interpretCycle
 (this=0x55555657f500)
     at engines/agi/cycle.cpp:149
 #18 0x000055555560e7c7 in Agi::AgiEngine::playGame (this=0x55555657f500)
     at engines/agi/cycle.cpp:442
 }}}

 This appears to be an issue drawing the characters in the startup logo.
 This is running 320x200, but the relevant part is here:
 {{{
 #7  0x00005555555db2ed in Agi::GfxMgr::drawCharacterOnDisplay
 (this=0x555556514a50, x=576,
     y=792, character=32 ' ', foreground=15 '\017', background=0 '\000',
     transformXOR=0 '\000', transformOR=0 '\000') at
 engines/agi/graphics.cpp:1182
 #8  0x00005555555daf8d in Agi::GfxMgr::drawCharacter (this=0x555556514a50,
 row=99, column=72,
     character=32 ' ', foreground=15 '\017', background=0 '\000',
 disabledLook=false)
     at engines/agi/graphics.cpp:1118
 }}}

 This is converting row 99, column 72 into (x, y) 576, 792 which is very
 much out of the 320x200 screen size. I think two fixes will be needed, a
 sanity clamp to prevent similar issues in future causing assertions and
 possibly some fix to work out why this results in this out of bound x, y
 ... unless the game is working on a larger screen size, but I don't think
 that is the issue (since even 640x480 would result in out of bounds).

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


More information about the Scummvm-tracker mailing list