Opened 16 years ago

Closed 16 years ago

#781 closed defect (fixed)

COMI: crash at start of part III

Reported by: SF/barneyntd Owned by: fingolfin
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Monkey Island 3

Description

I'm using:
ScummVM 0.4.0
Built on May 11 2003 13:36:33

to run Curse of Monkey Island (CD bought recently in UK)
under MacOS X.

As soon as I get to the start of Part III (leaving Booty Island in search
of Blood Island) Scummvm crashes with the following message:

ERROR: decompress Codec: input buffer overflow: 1370 bytes over
(we need 2 bits of data)

This error is repeatable: I started the whole game over went through
the first two parts again, and exactly the same thing happened. I've
attached a savegame; just pick up the shovel and wait to see the
crash.

Barney.

Ticket imported from: #739560. Ticket imported from: bugs/781.

Attachments (2)

comi.s12 (229.8 KB ) - added by SF/barneyntd 16 years ago.
savegame to demonstrate crash
comi.s06 (229.5 KB ) - added by SF/barneyntd 16 years ago.
another savegame to try to demonstrate crash

Download all attachments as: .zip

Change History (17)

by SF/barneyntd, 16 years ago

Attachment: comi.s12 added

savegame to demonstrate crash

comment:1 by fingolfin, 16 years ago

Can't reproduce that error with your save game with my german COMI.

However I do get these warnings:
WARNING: Couldn't find numsample 2300-T~1.IMX
!
WARNING: Couldn't find sample 2300-T~1.IMX!
WARNING: Decompression of bundle song failed!
WARNING: Couldn't find numsample 2301-I~1.IMX
!
WARNING: Couldn't find numsample 1305-D~1.IMX
!

by SF/barneyntd, 16 years ago

Attachment: comi.s06 added

another savegame to try to demonstrate crash

comment:2 by SF/barneyntd, 16 years ago

It seems to have gone intermittent on me! I tried it again with the same
savegame, and this time it worked fine. Try this new savegame, which seems
to crash more consistently.

Barney.

comment:3 by fingolfin, 16 years ago

With latest CVS I get no crashers even with your second save game.
Maybe the problem was fixed in CVS.

Anyway, any specific instructions in your second save game what I
should do to trigger the crash? Just dig Elaine up again?

comment:4 by SF/barneyntd, 16 years ago

With the second savegame & latest cvs, I still get this problem. Just dig up
Elaine, and wait: the crash happens when the Part III "title page" appears. It
even crashes the debugger: although the error message appears, you can't
type anything at the prompt.

Barney.

comment:5 by fingolfin, 16 years ago

Well I still can't reproduce it. Can you try if the problem occurs for you
with this build: http://dev.quendi.de/scummvm/ScummVM-
20030525.tar.gz

comment:6 by SF/barneyntd, 16 years ago

This build crashes just the same for me. This is the terminal output:

Looking for comi
Trying to start game 'The Curse of Monkey Island', version 8.1.0
kCGErrorIllegalArgument : CGSSetWindowDepth: Invalid window type
kCGErrorIllegalArgument : CGSSetWindowDepth: Invalid window
WARNING: Set userface charset to 1!
WARNING: Couldn't find numsample 2300-T~1.IMX!
WARNING: Couldn't find sample 2300-T~1.IMX!
WARNING: Decompression of bundle song failed!
backends/sdl/sdl.cpp:235: failed assertion `_hwscreen != NULL'
Abort

Barney.

comment:7 by fingolfin, 16 years ago

That's a complete different error, though!

Are you running in full screen mode?

comment:8 by SF/barneyntd, 16 years ago

Yes, I'm running in fullscreen mode, and I usually run from the "make
bundle" app, so I don't see the terminal output. The debugger message was
the same as ever.

I just tried it running in a small window, so I could see the terminal output as
it appears. The crash happens at this point:

Looking for comi
Trying to start game 'The Curse of Monkey Island', version 8.1.0
WARNING: Set userface charset to 1!
WARNING: Couldn't find numsample 2300-T~1.IMX!
WARNING: Couldn't find sample 2300-T~1.IMX!
WARNING: Decompression of bundle song failed!

The rest happens when I quit with cmd-Q (which is all I can do, as the
program ignores everything else).

Barney.

comment:9 by fingolfin, 16 years ago

No matter what I do, i can't reproduce this. I tried with a plain scummvm
build, a stripped one, and with ScummVM.app. All work just fine with your
save game well into part III, and to the ship figithing.
Are you playing directly from CD, or from hard disk?

Also, are you 100% sure the datafiles are not damaged? During the early
COMI development I had lots of strange video playback bugs until I
discovered that one of my files was damaged (due to a scratch on the CD I
can only guess in retrospect - cleaning the CD and copying the file again
helped).

I'll ask some other people to try and reproduce this.

comment:10 by fingolfin, 16 years ago

I take it all back, apparently I used the wrong save game - d'oh :-) Your
comi.s06 crashes for me, too.
Assigning to aquadran since this is his code, but I'll also take a look.

comment:11 by fingolfin, 16 years ago

Owner: set to aquadran

comment:12 by fingolfin, 16 years ago

I think I found the cause for this bug, it's a race condition: one thread (the
sound thread) decodes data from the music/voice bundle files; when going
to part III, we switch disks, however (that is we switch to the 2nd set of
bundle files). So the main thread closes the bundle files... which are being
read from -> OUCH

A quick hack (just never closing the bundle files) makes the crash go away,
at least.

We could fix that with some mutexes. But ideally I think only one thread (the
sound thread, probably) should ever open/close that file... well, I'll have to
look at it tomorrow, after some sleep.

comment:13 by SF/florob, 16 years ago

Yes it seems like its the sound did you mention that the music plays at
the beginning of part 3 if it doesn't crash and that it doesn't if it does?

comment:14 by fingolfin, 16 years ago

Owner: changed from aquadran to fingolfin
Resolution: fixed
Status: newclosed

comment:15 by fingolfin, 16 years ago

Wasn't thread related after all :-)

Note: See TracTickets for help on using tickets.