[Scummvm-tracker] [ScummVM :: Bugs] #15281: SCUMM: Loom: Crash when loading savegame from launcher
ScummVM :: Bugs
trac at scummvm.org
Fri Jul 19 16:28:41 UTC 2024
#15281: SCUMM: Loom: Crash when loading savegame from launcher
-------------------------+---------------------------
Reporter: eriktorbjorn | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Keywords:
Game: Loom |
-------------------------+---------------------------
I'm uncertain which games are affected, but some versions of Loom are
affected. The EGA and FM Towns versions at the very least.
When using the launcher to load a savegame, ScummVM will crash ''if'' that
savegame was made with the original GUI. If it was done with ScummVM's
save dialog, it works fine.
{{{
scummvm: engines/scumm/script.cpp:824: void
Scumm::ScummEngine::stopObjectCode(): Assertion `_currentScript != 0xFF'
failed.
}}}
I thought at first this was a regression... and in a sense it is, but only
because an `assert()` has been added to catch it. Backtrace from GDB:
{{{
#0 __pthread_kill_implementation
(threadid=<optimized out>, signo=signo at entry=6, no_tid=no_tid at entry=0)
at ./nptl/pthread_kill.c:44
#1 0x00007ffff62a53ff in __pthread_kill_internal
(signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff62564f2 in __GI_raise (sig=sig at entry=6)
at ../sysdeps/posix/raise.c:26
#3 0x00007ffff623f4ed in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff623f415 in __assert_fail_base
(fmt=0x7ffff63b6c08 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion at entry=0x555556fa1ed2 "_currentScript != 0xFF",
file=file at entry=0x555556fa1993 "engines/scumm/script.cpp",
line=line at entry=824, function=function at entry=0x555556fa1ea8 "void
Scumm::ScummEngine::stopObjectCode()")
at ./assert/assert.c:94
#5 0x00007ffff624f012 in __assert_fail
(assertion=0x555556fa1ed2 "_currentScript != 0xFF",
file=0x555556fa1993 "engines/scumm/script.cpp", line=824,
function=0x555556fa1ea8 "void Scumm::ScummEngine::stopObjectCode()") at
./assert/assert.c:103
#6 0x0000555557e8cbff in Scumm::ScummEngine::stopObjectCode()
(this=0x5555607354e0) at engines/scumm/script.cpp:824
#7 0x0000555557ea14e5 in Scumm::ScummEngine_v3::terminateSaveMenuScript()
(this=0x5555607354e0) at engines/scumm/scumm.cpp:3204
#8 0x0000555557ea1666 in
Scumm::ScummEngine_v3::scummLoop_handleSaveLoad()
(this=0x5555607354e0) at engines/scumm/scumm.cpp:3243
#9 0x0000555557e9f312 in Scumm::ScummEngine::scummLoop(int)
(this=0x5555607354e0, delta=3) at engines/scumm/scumm.cpp:2714
#10 0x0000555557e9e583 in Scumm::ScummEngine::go() (this=0x5555607354e0)
at engines/scumm/scumm.cpp:2471
#11 0x0000555557d231b6 in Scumm::ScummEngine::run() (this=0x5555607354e0)
at ./engines/scumm/scumm.h:583
#12 0x0000555557cef872 in runGame(Plugin const*, OSystem&, DetectedGame
const&, void const*)
(enginePlugin=0x55555ea53680, system=..., game=..., meDescriptor=0x0)
at base/main.cpp:311
#13 0x0000555557cf1c68 in scummvm_main(int, char const* const*)
(argc=1, argv=0x7fffffffe638) at base/main.cpp:796
#14 0x0000555557cec928 in main(int, char**) (argc=1, argv=0x7fffffffe638)
at backends/platform/sdl/posix/posix-main.cpp:44
}}}
The `terminateSaveMenuScript()` will set `_currentScript` to 0xFF before
calling `stopObjectCode()` so the only chance that it won't crash is if
`runScript()` in between sets `_currentScript` and then doesn't reset it.
But that doesn't seem to happen here.
--
Ticket URL: <https://bugs.scummvm.org/ticket/15281>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list