[Scummvm-tracker] [ScummVM :: Bugs] #17127: Zork Nemesis planet selection: game crashes when selecting some of the areas to progress to next
ScummVM :: Bugs
trac at scummvm.org
Wed Sep 23 09:00:11 UTC 2026
#17127: Zork Nemesis planet selection: game crashes when selecting some of the
areas to progress to next
--------------------+------------------------------
Reporter: jhaber1 | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: ZVision
Version: | Resolution:
Keywords: | Game: Zork Nemesis
--------------------+------------------------------
Comment (by eriktorbjorn):
In the version that crashes for me, the only files that are less than 10
bytes are the ones in the znemmx directory and two nullfile.src files.
As far as I can tell, the files in znemmx are used for `copy_file` (which
is a no-op in ScummVM), `music` and `syncsound` script instructions.
That translates into `ActionSyncSound` and `ActionMusic` actions. Both of
these should go through `MusicNode`, which will call `makeRawZorkStream()
with a filename for all .raw files.
So something like this should work, but is there a better way?
{{{
diff --git a/engines/zvision/sound/zork_raw.cpp
b/engines/zvision/sound/zork_raw.cpp
index 10666f75302..ce01f3ea5ba 100644
--- a/engines/zvision/sound/zork_raw.cpp
+++ b/engines/zvision/sound/zork_raw.cpp
@@ -244,6 +244,17 @@ Audio::RewindableAudioStream
*makeRawZorkStream(Common::SeekableReadStream *stre
Audio::RewindableAudioStream *makeRawZorkStream(const Common::Path
&filePath, ZVision *engine) {
Common::String baseName = filePath.baseName();
Common::File *file = engine->getFileManager()->open(filePath);
+
+ if (engine->getGameId() == GID_NEMESIS) {
+ // In many releases, the .raw files in the znemmx
directory are
+ // just 3 bytes in length, which will trip an assertion
because
+ // they are expected to be stereo sounds.
+
+ if (file->size() == 3) {
+ warning("makeRawZorkStream: Skipping near-empty
file: %s", filePath.toString().c_str());
+ return NULL;
+ }
+ }
const SoundParams *soundParams = NULL;
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/17127#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list