Opened 14 years ago

Closed 14 years ago

Last modified 5 years ago

#4745 closed defect (fixed)

SWORD1: Macintosh Demo crashes after Intro

Reported by: lordhoto Owned by: eriktorbjorn
Priority: normal Component: Engine: Sword1
Version: Keywords:
Cc: Game: Broken Sword 1

Description

Hi,

ScummVM SVN r47165 Linux/amd64 g++ 4.4.2

After the intro ScummVM crashes with:

Unexpected cow header size 1179011410!

I tried the demo from here: http://demos.robertmegone.com/sword1/sword1-mac-demo-en.zip (i.e. the one from our Demo's page).

Ticket imported from: #2928411. Ticket imported from: bugs/4745.

Change History (3)

comment:1 by eriktorbjorn, 14 years ago

I think I see more-or-less what happens. It works in 0.13.1 but not in the trunk.

Because of some code that was added to check the endianness of the sound file, in combination with some older code, we eventually came to a situation where the sound system had been initialised while currentCD was 0, so _currentCowFile was 0. The next time newScreen() was called with currentCD != 0, it did not close the sound file before trying to reopen it. This led it to read the header from somewhere early in the file, rather than at the very beginning.

I have changes things slightly so that initCowSystem() is a no-op if currentCD is 0, and so that newScreen() checks _cowFile.isOpen() instead of _currentCowFile to see if it needs to call closeCowSystem(). Either of these changes should be enough on its own.

comment:2 by eriktorbjorn, 14 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:3 by digitall, 5 years ago

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.