Opened 4 months ago

Closed 3 months ago

#15125 closed defect (invalid)

SCUMM: DIG: segmentation fault after entering the asteroid

Reported by: 1player Owned by: AndywinXp
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: 1player Game: The Dig

Description (last modified by 1player)

[94639.807951] scummvm[447613]: segfault at 5654460ebd70 ip 0000564a19d6b28c sp 00007ffce2f2e730 error 4 in scummvm[564a19ca4000+3e62000] likely on CPU 15 (core 5, socket 0)

Reproducible with Steam's version of The Dig, imported wholesale into ScummVM as suggested by the Wiki.

Steps to reproduce:

  • Load the attached save file
  • Crashes a couple of seconds later

Affects:

ScummVM from Flathub and the one in the Arch Linux repositories.

ScummVM 2.8.1 (Mar 16 2024 08:27:46)
Using SDL backend with SDL 2.30.2
Features compiled in: TAINTED Vorbis FLAC MP3 ALSA SEQ sndio TiMidity RGB zLib MPEG2 FluidSynth Theora AAC A/52 FreeType2 FriBiDi JPEG PNG GIF TTS cloud (servers, local) ENet SDL2 TinyGL OpenGL (with shaders)

Attachments (3)

dig-steam-win.s02 (26.8 KB ) - added by 1player 4 months ago.
dig-steam-win.s04 (26.9 KB ) - added by AndywinXp 4 months ago.
dig-steam-win.s03 (26.5 KB ) - added by AndywinXp 4 months ago.

Download all attachments as: .zip

Change History (15)

by 1player, 4 months ago

Attachment: dig-steam-win.s02 added

comment:1 by 1player, 4 months ago

Description: modified (diff)

comment:2 by AndywinXp, 4 months ago

Component: --Unset--Engine: SCUMM
Summary: The Dig segmentation fault after entering the asteroidSCUMM: DIG: segmentation fault after entering the asteroid

comment:3 by AndywinXp, 4 months ago

Strange, I can't reproduce it from a new game, but I can from within your savegame... I'll ask around if any other dev is able to reproduce this

comment:4 by 1player, 4 months ago

Mind sharing your save? I tried bisecting the crash, but older versions refuse to load the game as the file has an 'invalid version'. The earliest I've been able to try is v2.8.0, which still segfaults.

By the way, this is the stacktrace:

Thread 1 "scummvm" received signal SIGSEGV, Segmentation fault.
0x0000555555a0732c in Scumm::IMuseDigital::playDigMusic (this=0x5555574e9070, songName=0x555f7e1e475c <error: Cannot access memory at address 0x555f7e1e475c>, table=0x555f7e1e4758, attribPos=1090519115, sequence=true)
    at engines/scumm/imuse_digi/dimuse_scripts.cpp:534
534				if (table->attribPos != 0)
(gdb) bt
#0  0x0000555555a0732c in Scumm::IMuseDigital::playDigMusic
    (this=0x5555574e9070, songName=0x555f7e1e475c <error: Cannot access memory at address 0x555f7e1e475c>, table=0x555f7e1e4758, attribPos=1090519115, sequence=true) at engines/scumm/imuse_digi/dimuse_scripts.cpp:534
#1  0x0000555555a0666c in Scumm::IMuseDigital::setDigMusicSequence (this=0x5555574e9070, seqId=2000) at engines/scumm/imuse_digi/dimuse_scripts.cpp:316
#2  0x0000555555a05aaa in Scumm::IMuseDigital::scriptSetSequence (this=0x5555574e9070, soundId=0) at engines/scumm/imuse_digi/dimuse_scripts.cpp:136
#3  0x0000555555a05937 in Scumm::IMuseDigital::scriptRefresh (this=0x5555574e9070) at engines/scumm/imuse_digi/dimuse_scripts.cpp:98
#4  0x0000555555a05777 in Scumm::IMuseDigital::scriptParse (this=0x5555574e9070, cmd=4, a=-1, b=-1) at engines/scumm/imuse_digi/dimuse_scripts.cpp:48
#5  0x00005555559f9d0f in Scumm::IMuseDigital::diMUSERefreshScript (this=0x5555574e9070) at engines/scumm/imuse_digi/dimuse_engine.cpp:999
#6  0x00005555559f7bb5 in Scumm::IMuseDigital::refreshScripts (this=0x5555574e9070) at engines/scumm/imuse_digi/dimuse_engine.cpp:377
#7  0x00005555559c80a5 in Scumm::ScummEngine_v7::scummLoop_handleSound (this=0x555557f59760) at engines/scumm/scumm.cpp:3586
#8  0x00005555559c4b76 in Scumm::ScummEngine::scummLoop (this=0x555557f59760, delta=5) at engines/scumm/scumm.cpp:2786
#9  0x00005555559c3a28 in Scumm::ScummEngine::go (this=0x555557f59760) at engines/scumm/scumm.cpp:2457
#10 0x00005555559ca067 in Scumm::ScummEngine::run (this=0x555557f59760) at ./engines/scumm/scumm.h:583
#11 0x000055555597c3b2 in runGame (plugin=0x555556bd6ad0, enginePlugin=0x555556bd6720, system=..., debugLevels=...) at base/main.cpp:326
#12 0x000055555597e79c in scummvm_main (argc=1, argv=0x7fffffffdbd8) at base/main.cpp:805
#13 0x000055555597925e in main (argc=1, argv=0x7fffffffdbd8) at backends/platform/sdl/posix/posix-main.cpp:44

comment:5 by 1player, 4 months ago

Cc: 1player added

by AndywinXp, 4 months ago

Attachment: dig-steam-win.s04 added

by AndywinXp, 4 months ago

Attachment: dig-steam-win.s03 added

comment:6 by 1player, 4 months ago

These work for me, thanks (it crashed three times before I made a save, I didn't want to replay the whole thing again.)

comment:7 by AndywinXp, 4 months ago

Just to be sure: are you able to replicate it each single time? (EDIT: Meaning, playing from the beginning).

@eriktorbjorn did some useful debugging on this ticket and found out that upon loading your save (which crashes on our end as well) _curMusicState was 1090519115 which likely smells like memory corruption...

Last edited 4 months ago by AndywinXp (previous) (diff)

comment:8 by AndywinXp, 4 months ago

Also, just to be sure: are you able to replicate it with the same data files on another device?

comment:9 by 1player, 4 months ago

I don't have another device to test with. I have played from the beginning only once AFAIR, and made a few saves along the way. It is possible the corruption started on the first save. I haven't tried replaying the whole thing again on a fresh save.

Last edited 4 months ago by 1player (previous) (diff)

comment:10 by AndywinXp, 4 months ago

Oh 🙂 that changes things... It's definitely possible that this was a one-off corruption thing. When you can please try the first 5 minutes of the game on a fresh start (up until you get inside the asteroid) and tell me how it goes.

comment:11 by AndywinXp, 3 months ago

Any news on this?

comment:12 by AndywinXp, 3 months ago

Owner: set to AndywinXp
Resolution: invalid
Status: newclosed

Got a mail answer by the original user: "Sorry haven't had the chance to test. I blame a random corruption in my save, so feel free to close the issue."

Thank you for the follow up :-) closing

Note: See TracTickets for help on using tickets.