Opened 7 days ago
#17250 new defect
DIRECTOR: ROBINSON: Fatal "Builtin 'count' did not return value!" when loading chap0.Dxr (FileXtra DirectoryToList returns VOID)
| Reported by: | philmeth | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | Engine: Director |
| Version: | gsoc | Keywords: | |
| Cc: | philmeth | Game: |
Description
Robinson Crusoe (Tivola, Director 5, German Windows CD, target robinson-win-de) can't be played: right after
start-up ScummVM switches to chap0.Dxr (the book, i.e. the actual game) and immediately stops with a
fatal Lingo error. The game never becomes playable.
Reproduced with:
- ScummVM 2026.2.0 (release)
- ScummVM 2026.3.0 (release)
- ScummVM 2026.3.1git31949-gabd1ca3e317 (daily build, Sep 30 2026), with a clean config
Steps to reproduce
- Add the game (detected as "Robinson Crusoe (Standard Version/Windows/German)", engine director, gameid robinson).
- Start it.
- After ~5 seconds the debugger opens with:
ERROR: Builtin 'count' did not return value!
Cause (from a --debugflags=lingoexec --debuglevel=5 trace)
In the new handler of the parent script prefFileObj (script 233), the game builds a preferences
folder path, creates the folder, lists its contents and calls count() on the result:
cb_call "getOSDirectory"
STUB: FileIO::m_getOSDirectory() -> ""
c_stringpush "\rcpref\" / c_ampersand -> "\rcpref\"
cb_theassign "ppreffolderpath"
cb_list / cb_theassign "pusedbookmark" -> []
cb_call "DirectoryToList" ("\rcpref\")
WARNING: FileXtra::m_DirectoryToList(): directory not found: \rcpref\!
-> <Void>
cb_varassign "myfiles"
cb_call "count" (<Void>)
WARNING: BUILDBOT: b_count: list arg should be of type ARRAY, PARRAY, or OBJECT, not VOID!
ERROR: Builtin 'count' did not return value!
Earlier in the same run:
STUB: FileXtra::m_CreateDirectory("\rcpref")
So:
FileIO::getOSDirectory()is a stub and returns "".FileXtra::CreateDirectory("\rcpref")is a stub, so the folder is never created.FileXtra::DirectoryToList("\rcpref\")therefore finds no directory and returns VOID instead of a list.count(VOID)is fatal.
On a real Windows machine the folder exists (created a moment earlier), so DirectoryToList returns a list
(empty on first start) and count returns 0. The folder is used to store bookmarks (pusedbookmark).
Possible fixes
- Make
FileXtra::m_DirectoryToList()return an empty list instead of VOID when the directory doesn't exist, and/or - implement
FileXtra::m_CreateDirectory()(e.g. as a virtual folder in the save path), so the bookmark files can also be saved later.
Other observations (possibly separate issues)
intro.Dxris loaded but left again almost at once (a few trace lines laterchap0.diris set as the next movie). No intro is visible. The intro probably uses QuickTime video.- CD check:
STUB: FileXtra::m_FileExists(":\data\gyoza.dxr"). - Unimplemented xlibs:
qtvrw.qtc,qtvrw,qtvrw32.qtc(QTVR, only used by the Deluxe version's panoramas). - On a native Windows 11 machine the original projector doesn't run either (crash in winmmbase.dll with Win95/98 compatibility mode), so ScummVM is the only way to play it on modern systems.
Game files
Game folder: Crusoe8.exe + icon.Cxt + xtras\ (fileio.x32, fileio16.x16, filextra.x16, filextra.x32,
qtvrw.qtc, qtvrw.x16, qtvrw32.qtc, qtvrw32.x32) + data\ from the CD (190 files).
As reported by ScummVM on start-up:
CHAP0.DXR: aadcec84ebb2745dfeb90af3af517b12, 1111380 bytes CRUSOE8.EXE: c1db9e4179da862f253fc3c757cacd83, 1398787 bytes
Full-file MD5s:
Crusoe8.exe 1398787 2895f89a920bab024665139df372bce4 icon.Cxt 7410602 9586a9e4deb177884cd379d7cb7208e0 intro.Dxr 288856 894b94412909d0b4ae860d4b6a014412 chap0.Dxr 1111380 1a5146952114aef6f3e704e8d06403e1 pages0.Cxt 5834800 e0ec77e66ae270ea5389ed2d69f393cb
I can provide the full Lingo trace or test builds if that helps.
