Opened 3 years ago

Closed 3 weeks ago

#13221 closed defect (outdated)

SCUMM: Monkey Island 2 Segfault (Midi related)

Reported by: mgerhardy Owned by: somaen
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 2

Description

ScummVM version 2.5.0 (debian testing)

Thread 1 "scummvm" received signal SIGSEGV, Segmentation fault.
0x00005555558deb3a in Scumm::IMuseInternal::reallocateMidiChannels (this=0x0, midi=0x0) at engines/scumm/imuse/imuse.cpp:1713
1713				if (part->_player && part->_player->getMidiDriver() == midi &&
(gdb) bt
#0  0x00005555558deb3a in Scumm::IMuseInternal::reallocateMidiChannels (this=0x0, midi=0x0) at engines/scumm/imuse/imuse.cpp:1713
#1  0x00005555558e053f in Scumm::Part::clearToTransmit (this=0x555557351888) at engines/scumm/imuse/imuse_part.cpp:334
#2  0x00005555558e0562 in Scumm::Part::sendAll (this=0x555557351888) at engines/scumm/imuse/imuse_part.cpp:339
#3  0x00005555558dfe17 in Scumm::Part::fix_after_load (this=0x555557351888) at engines/scumm/imuse/imuse_part.cpp:189
#4  0x00005555558dea2c in Scumm::IMuseInternal::fix_parts_after_load (this=0x555557350ac0) at engines/scumm/imuse/imuse.cpp:1674
#5  0x00005555558dae56 in Scumm::IMuseInternal::saveLoadIMuse (this=0x555557350ac0, s=..., scumm=0x5555572e4000, fixAfterLoad=true) at engines/scumm/imuse/imuse.cpp:445
#6  0x000055555585b815 in Scumm::ScummEngine::saveLoadWithSerializer (this=0x5555572e4000, s=...) at engines/scumm/saveload.cpp:1500
#7  0x000055555585bbea in Scumm::ScummEngine_v5::saveLoadWithSerializer (this=0x5555572e4000, s=...) at engines/scumm/saveload.cpp:1563
#8  0x000055555585687c in Scumm::ScummEngine::loadState (this=0x5555572e4000, slot=1, compat=false, filename=...) at engines/scumm/saveload.cpp:450
#9  0x00005555558562d2 in Scumm::ScummEngine::loadState (this=0x5555572e4000, slot=1, compat=false) at engines/scumm/saveload.cpp:321
#10 0x000055555586e32f in Scumm::ScummEngine::go (this=0x5555572e4000) at engines/scumm/scumm.cpp:2384
#11 0x0000555555871a3e in Scumm::ScummEngine::run (this=0x5555572e4000) at ./engines/scumm/scumm.h:335
#12 0x0000555555832683 in runGame (plugin=0x555556a067d0, enginePlugin=0x555556593da0, system=..., debugLevels=...) at base/main.cpp:318
#13 0x0000555555833f33 in scummvm_main (argc=1, argv=0x7fffffffe1f8) at base/main.cpp:626
#14 0x000055555582fb83 in main (argc=1, argv=0x7fffffffe1f8) at backends/platform/sdl/posix/posix-main.cpp:44

Attachments (1)

monkey2-de.s01 (33.6 KB ) - added by mgerhardy 3 years ago.

Download all attachments as: .zip

Change History (7)

by mgerhardy, 3 years ago

Attachment: monkey2-de.s01 added

comment:1 by mgerhardy, 3 years ago

Connected to Alsa sequencer client [14:0]
ALSA client initialized [128:0]

comment:2 by athrxx, 3 years ago

I can't reproduce that with your savegame on Windows, neither with hardware MT-32 nor with the emulator. So, maybe it only happens with ALSA.

Since at least the direct cause of the segfault is kind of obvious from your post (still no idea why _player->_sewould ever be null): Could you please try to change line 333 in imuse_parts.cpp from

if (_instrument.isValid())

to

if (_player && _player->_se && _player->getMidiDriver() && _instrument.isValid())

and see if that solves the issue?

Last edited 3 years ago by athrxx (previous) (diff)

comment:3 by sev-, 2 years ago

mgehardy, any update?

comment:4 by mgerhardy, 2 years ago

Sorry - I haven't noticed the code change request on the ticket. I can't reproduce it anymore. Tried to cycle between all different kind of midi settings - out no "luck".

comment:5 by somaen, 12 months ago

In this case, perhaps we should close this?

comment:6 by somaen, 3 weeks ago

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