Opened 21 years ago

Closed 21 years ago

#1257 closed defect (fixed)

COMI: Crash when closing ScummVM during intro

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

Description

When closing ScummVM while the intro is playing, ScummVM crashes. Built from CVS 01-10-2003 on Win32 (MSVC2003)

Ticket imported from: #816086. Ticket imported from: bugs/1257.

Change History (11)

comment:1 by SF/doc_wagon, 21 years ago

Summary: COMI - Crash when closing ScummVM during introCOMI: Crash when closing ScummVM during intro

comment:2 by SF/doc_wagon, 21 years ago

Forgot to mention that this is with the english version of CoMI. And it only crashes during the "real" intro, not during the "CMI - The Monkeys are listening" part.

comment:3 by fingolfin, 21 years ago

You mean it crashes when you quite while the intro video is playing then?

Can't reproduce the problem over here on Mac OS X.

Kirben, can you?

comment:4 by fingolfin, 21 years ago

Owner: set to Kirben

comment:5 by fingolfin, 21 years ago

Owner: changed from Kirben to aquadran

comment:6 by fingolfin, 21 years ago

... or maybe aquadran can (another windows users - hm, anybody else on the team who uses windows?)

comment:7 by SF/sir_kill_a_lot, 21 years ago

CoMI English, WinXP Pro ScummVM 0.5.3cvs (Oct 1 2003 22:13:29)

It crashes when exiting while the intro is shown and also when exiting during the part screen with the following error: Fatal signal: Segmentation Fault (SDL Parachute Deployed)

comment:8 by Kirben, 21 years ago

I can reproduce the problem with current ScummVM cvs too, a gdb back trace if it is any help: Program received signal SIGSEGV, Segmentation fault. 0x00544511 in Channel::~Channel() (this=0x4512fb8) at sound/mixer.cpp:469 469 *_handle = 0; (gdb) bt #0 0x00544511 in Channel::~Channel() (this=0x4512fb8) at sound/mixer.cpp:469 #1 0x005c550e in ChannelStream::~ChannelStream() (this=0x4512fb8) at sound/audiostream.h:94 #2 0x00542bd1 in SoundMixer::~SoundMixer() (this=0x3431f78) at sound/mixer.cpp:147 #3 0x00407bd2 in Engine::~Engine() (this=0x3422958) at base/engine.cpp:45 #4 0x0041259e in Scumm::~Scumm() (this=0x3422958) at scumm/scummvm.cpp:868 #5 0x005d12db in Scumm_v8::~Scumm_v8() (this=0x3422958) at common/str.h:129 #6 0x00407782 in main (argc=2, argv=0x13925a0) at base/main.cpp:322

comment:9 by fingolfin, 21 years ago

Owner: aquadran removed

comment:10 by fingolfin, 21 years ago

From the backtrace the problem is that something (let's call it 'A') is using a mixer stream. That something is deleted when we quit, *before* the mixer is. As a result, the stream still carries a reference to the sound handle used by A. But A and the sound handle are already gone. So setting the handle to 0 of course is wrong; on my system it's probably harmless, on yours it crashes.

A possible fix might be to stop all sound before quitting. Try putting this into the ScummEngine destructor (i.e. around line826 in scummvm.cpp), does that help?: _mixer->stopAll();

comment:11 by fingolfin, 21 years ago

Owner: set to fingolfin
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.