Opened 20 years ago

Closed 20 years ago

#1746 closed defect (fixed)

BS1: German version crashes. Speech-related?

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


Seen on the Help forum:

By: jareth2 - jareth2 Broken Sword I crashes with segfault
2004-08-29 16:44

I am playing the german version of Broken Sword I (Baphomets Fluch). In at least two occasions scummvm crashes with a "segmentation fault, sdl parachute deployed" (showing the gruber card to lobineau, asking the old man in the pub about the ghost).

By: Florian Zeitz - florob RE: Broken Sword I crashes with segfault
2004-08-29 18:42

This seems to only occur with current CVS, if you want to play past that points play with 0.6.1b.

In case a developer wants to look in this and it's not allready know gdb says: Program received signal SIGSEGV, Segmentation fault. 0x005386b1 in Sword1::Sound::uncompressSpeech(unsigned, unsigned, unsigned*) ( this=0x207b610, index=62453052, cSize=3959, size=0x22fa18) at sword1/sound.cpp:206 206 *dstPos++ = srcData[srcPos]; (gdb) warning: HEAP[scummvm.exe]: warning: Invalid allocation size - FFD60000 (exceeded 7ffdefff)

By: Torbjörn Andersson - eriktorbjorn RE: Broken Sword I crashes with segfault
2004-08-29 19:57

The only thing I'm aware of that's changed recently in that part of the code was when kirben added support for speech in the demo. That change can be seen at

However, apart from not knowing enough about the BS1 engine, I don't have the German version to test with. Anyway, it'd be much better if this discussion was being held in the bug tracker instead, where there is less chance of it being lost in the noise.

Ticket imported from: #1018659. Ticket imported from: bugs/1746.

Attachments (1)

bs1_demo.diff (5.3 KB ) - added by eriktorbjorn 20 years ago.
Patch against an August 30 CVS snapshot

Download all attachments as: .zip

Change History (9)

comment:1 by eriktorbjorn, 20 years ago

Owner: set to Kirben

comment:2 by eriktorbjorn, 20 years ago

Kirben, do you think that change could have anything to do with it? I don't know that much about the compression scheme BS1 uses. Could there be cases where the "compressed" version legitimately is bigger than the uncompressed one?

(In BS2 it couldn't happen: There the first sample is stored as two bytes, and all subsequent ones as one byte each, so the compression rate would always be close to 50%. Except, of course, for extremely short sounds.)

comment:3 by Kirben, 20 years ago

Yes I think my changes would be the cause of the crashes, I just used that check since we have no separate target. I didn't think it would be triggered in full game either, but sounds like it is. So would be best to add a separate demo target.

by eriktorbjorn, 20 years ago

Attachment: bs1_demo.diff added

Patch against an August 30 CVS snapshot

comment:4 by eriktorbjorn, 20 years ago

Something like this patch, then? I don't have the demo available at the moment, so I can't test it.

comment:5 by SF/florob, 20 years ago

At least the Game itself seems to work again, but I don't have the demo either. BTW why is the Game Demos section saying the demo is not going to be supported?

comment:6 by SF/florob, 20 years ago

Oh and did you notice we are talking about Bug No.1001288 we have a bug report twice here.

comment:7 by Kirben, 20 years ago

Owner: changed from Kirben to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:8 by Kirben, 20 years ago

Patch works fine, so I added it to ScummVM cvs.

The Broken Sword 1 demo is listed as not been supported, as it was thought there were some resource differences, which no one was interested in looking into. Although I have not noticed any so far when browsing disassemble of the demo.

Note: See TracTickets for help on using tickets.