#14467 closed defect (fixed)

Sam and Max Hit the Road. Object 0 not found in room 93

Reported by: daedalus1776 Owned by: AndywinXp
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: daedalus1776 Game: Sam and Max


ScummVM 2.8.0git4838-g24429f74179
When speaking to Doug the Moleman at the carnival, immediately after the ball of twine is added to your map, the game crashes. This happens every time and can be replicated. (I went to make a save file but the moment I try to load any save file, I get the same crash) The error is as follows:

ERROR: (23:34:0x4a): findObjectInRoom: Object 0 not found in room 93!

Language: English
Version: CD Talkie version
My OS: Windows 11 22H2 Build 22621.1702

Attachments (2)

samnmax.s01 (30.2 KB ) - added by daedalus1776 13 months ago.
image-20230516-204920.png (23.9 KB ) - added by daedalus1776 13 months ago.

Download all attachments as: .zip

Change History (18)

by daedalus1776, 13 months ago

Attachment: samnmax.s01 added

by daedalus1776, 13 months ago

Attachment: image-20230516-204920.png added

comment:1 by AndywinXp, 13 months ago

Thanks, I'm on it.

comment:2 by AndywinXp, 13 months ago

This is strange: the savefile version appears to be 19, which is way too old and not the version produced by a current ScummVM build. Also the md5 of this version is marked as unknown. Maybe the game files are damaged somehow? Where did you get them?

comment:3 by AndywinXp, 13 months ago

I played the game from the beginning up to the point in which you have to talk to Doug to unlock the ball of twine location, and I couldn't crash it :(

Trying to load your savegame puts ScummVM in some kind of endless loop for some reason, this is fishy

Last edited 13 months ago by AndywinXp (previous) (diff)

comment:4 by daedalus1776, 13 months ago

That's really weird... This is just the version I got straight from GOG. Plays fine on 2.7. I mostly run it on 2.6.1 for the speedrun aspect. I can try confirm the files through gog or something (It is possible I gave you a savegame from a different scummvm version, although I was pretty sure it was the one I just did in 2.8.0git)

comment:5 by dwatteau, 13 months ago

I encountered a new #14468 issue when trying to reproduce this, but I can't say whether the problems are related.

comment:6 by AndywinXp, 13 months ago

Any news about this ticket? Did you happen to confirm the file integrity from GOG?

comment:7 by daedalus1776, 13 months ago

Yeah and it all seems fine. Like I said, it plays flawlessly on 2.7 and 2.6.1. I kind of just expected you to get the crash as well... Not super sure what's causing it

comment:8 by tag2015, 13 months ago

This seems to be related to the other bug, and I can reproduce it.

  1. Make sure that Original GUI is enabled in the options
  2. Start game (happens in the office, when you have control, but also in the opening)
  3. Quicksave using Alt+(anynumber)
  4. Try to load the created save

The issue does not manifest if the original gui is disabled.

comment:9 by tag2015, 13 months ago

Additional info: it also happens if you try to quickload an empty save location, so it's not the save itself that causes it.

comment:10 by AndywinXp, 13 months ago

This is getting funky: on some occasions I can reproduce it, but not on others.

I'll investigate further.

comment:11 by AndywinXp, 13 months ago

Apparently what's causing the issue is this call which happens after loading savegames:

runScript(VAR(VAR_SAVELOAD_SCRIPT2), 0, 0, nullptr);

The reason this call is here is that it's needed for correctly restoring the cursor after saving a game from the original menu. I'll see if there's a clever way to detect that.

comment:12 by AndywinXp, 13 months ago

Okay, I think I found out what is happening (but not why as of right now): the aforementioned script launches a o6_cursorCommand() command with the SO_CURSOR_IMAGE opcode.

Unfortunately, when fetching the arguments from the stack (object id and room) it will fail to load the object id, which will then be set to 0 (when it should actually be around 880something, which identifies the cursor images). The object 0 doesn't exist in room 93 (which I believe is the room containing common graphics maybe?), hence the crash.

What is to be gathered from all of this? I think that somehow the exit-save script fails to fetch the object id of the cursor, meaning... it wasn't saved properly. I'll have to continue digging...

comment:13 by AndywinXp, 12 months ago

I pushed a post-load fix to master so that the game doesn't crash with the savegames which are already affected. Now the worse that can happen to those savegames is that the cursor will show the wrong icon until you change the verb :-)

I have still to fix the root cause for it, so I won't close this yet.

comment:14 by AndywinXp, 12 months ago

Owner: set to AndywinXp
Resolution: fixed
Status: newpending

And done, pushed to master the proper fix. Please wait for a new daily build if you can't build the current master codebase and let me know if the issue is gone for you.

comment:15 by daedalus1776, 12 months ago

Yep! That's fixed it. No save/load crashes and it's not crashing at Doug the moleman's place now either. Thanks heaps!

comment:16 by AndywinXp, 12 months ago

Status: pendingclosed


Note: See TracTickets for help on using tickets.