Menu

#6802 FREDDI2: assert() error

Freddi Fish 2
open
nobody
None
5
2016-08-03
2015-02-08
Ben
No

When you give a purple sea urchin to Barnacle Bob without talking to him first I get an assert error (see attached screenshot). This is with the dutch version on Windows 7, I compiled it myself with mscv10.

ScummVM 1.8.0git (Feb 4 2015 21:03:07)
Features compiled in: Vorbis FLAC MP3 RGB zLib Theora FreeType2 JPEG PNG

1 Attachments

Discussion

  • Ben

    Ben - 2015-02-08

    Saved game right before the assert(). Just give the urchin to Bob. You can skip the dialog and trigger it immediately.

    I also checked if the original game has a problem with this too (using a vmware emulated windows XP) situation too, but it plays fine.

     

    Last edit: Ben 2015-02-08
  • fuzzie

    fuzzie - 2015-03-07

    I can reproduce with freddi2-nl on master:

    scummvm: engines/scumm/object.cpp:113: void Scumm::ScummEngine::setOwnerOf(int, int): Assertion `obj > 0' failed.

     
  • Torbjörn Andersson

    I can reproduce with my English version as well, but only (?) if I carry just one sea urchin. The first time I tried it, I had four and everything worked as expected. I'm attaching a savegame from right outside the emporium.

     
  • fuzzie

    fuzzie - 2015-03-07

    Bug is in room 39. Problem is script 18, in the localvar2==78 case; this only sets the obj id if var198 is non-zero, but in the asserting case, it is obj 0. That means two setOwnerOf calls are made with obj 0.

    Adding a workaround to just ignore the obj==0 calls in this circumstance seems like it would work fine (there's already one in the code here), but I'm not sure what to check for this (room ID and var198 being zero?). The correct setOwnerOf calls are made afterwards, so this seems to work just fine.

     
  • Ben

    Ben - 2016-08-03

    This seems to work for me if I insert it at line 113 of object.cpp. But it's a different script number than you have found. Which version of FF2 uses script 18? The ones I tried (mostly from Steam) all use 10.

    if (_game.id == GID_HEGAME && obj == 0 && vm.slot[_currentScript].number == 10)
        return;