Opened 4 years ago

Closed 4 years ago

#11463 closed defect (fixed)

Maniac Mansion [Apple IIgs] : Game crash when accessing garage

Reported by: laurentlasalle Owned by: sev-
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: laurentlasalle Game: Maniac Mansion


I'm unable to access the garage scene in the Apple IIgs version of Maniac Mansion under ScummVM 2.1 and 2.2 (ERROR: Cannot read resource). I get normal behaviour under ScummVM 2.0. I am using Windows 10.0.18362.

FYI, I tried 2 different dumps of the game, one where maniac1.dsk is CRC32: 15798A84 and another with CRC32: 6A61FF48. Both maniac2.dsk files are identical, with a checksum of CRC32: DE0A27E2. Same result in both cases.

I'm including a save file from the storage room with the pool door unlocked and open. Just walk in the pool scene, open the yellow gate, and try to access the garage scene.

Attachments (1)

maniac-2gs.s02 (5.8 KB ) - added by laurentlasalle 4 years ago.

Download all attachments as: .zip

Change History (5)

by laurentlasalle, 4 years ago

Attachment: maniac-2gs.s02 added

comment:1 by laurentlasalle, 4 years ago

Interesting notes. I did a comparison with --debuglevel=9 on both ScummVM 2.0 and 2.2, and got a glimpse of what the issue might be.

This is where ScummVM 2.2 crashes :

[2020-05-04 19:50:53] loadResource(Sound,40)
[2020-05-04 19:50:53] openRoom(16)
[2020-05-04 19:50:53] _res->createResource(Sound,40,21)
[2020-05-04 19:50:53] loadResource(Sound,64)
[2020-05-04 19:50:53] openRoom(16)
[2020-05-04 19:50:53] _res->createResource(Sound,64,5)
[2020-05-04 19:50:53] loadResource(Sound,68)
[2020-05-04 19:50:53] openRoom(16)
[2020-05-04 19:50:53] _res->createResource(Sound,68,52428)

And here is the equivalent in ScummVM 2.0 :

[2020-05-04 20:35:39] loadResource(Sound,40)
[2020-05-04 20:35:39] openRoom(16)
[2020-05-04 20:35:39] _res->createResource(Sound,40,21)
[2020-05-04 20:35:39] loadResource(Sound,64)
[2020-05-04 20:35:39] openRoom(16)
[2020-05-04 20:35:39] _res->createResource(Sound,64,5)
[2020-05-04 20:35:39] loadResource(Sound,68)
[2020-05-04 20:35:39] openRoom(16)
[2020-05-04 20:35:39] _res->createResource(Sound,68,0)

Is 52428 a normal length for sound resource?

comment:2 by laurentlasalle, 4 years ago

Component: --Unset--Engine: SCUMM

Typing "room 16" command from the console window can be use as a quicker way to reproduce the bug.

Last edited 4 years ago by laurentlasalle (previous) (diff)

comment:3 by sev-, 4 years ago

Actually, it was an accident that it was working in 2.0. I just checked back in history, and it never worked properly. I can reproduce it on Mac only with Address Sanitizer, which tells me that most probably there is an uninitialized memory somewhere.

I'll keep digging.

comment:4 by sev-, 4 years ago

Owner: set to sev-
Resolution: fixed
Status: newclosed

Okay, I fixed it in 1a6ffd6398339a82e79817c065bb0ae926dd4b63. That sound resource is incorrect, having no size. Thus, we were reading random stuff and that led to this behaviour.

Note: See TracTickets for help on using tickets.