Problem
The engine already reports archive failures, and GenHub ignores them.
Verified on bobtista/GeneralsGameCode at bobtista/topic/trunk:
- A root holding no archives aborts during initialisation with exit 1 and a
ReleaseCrashInfo.txt.
- An unmountable archive additionally writes to stderr:
[ggc] archive identifier mismatch: <file> — StdBIGFileSystem.cpp:203
[ggc] ARCHIVE MOUNT FAILED, contents unavailable this run: <file> — StdBIGFileSystem.cpp:357
Neither reaches the main loop. GenHub does not use either signal.
Two concrete gaps:
1. The immediate-exit window is 500 ms.
ProcessConstants.LauncherDetectionDelayMs = 500
GameProcessManager waits 500 ms, then reports "exited immediately with code {ExitCode}" with captured stderr. An initialisation abort landing inside that window is caught and reported well. One landing outside it is reported as a successful launch, and the process then dies unobserved. Whether the engine beats 500 ms on a cold start, a slow disk, or under emulation is unmeasured.
2. Nothing branches on the stderr sentinel.
The [ggc] lines are captured by the stderr work in #332 and surfaced verbatim when the exit is caught, but they are never matched. A launch that mounted nothing is indistinguishable to GenHub from any other non-zero exit, so the user gets a generic failure rather than "this archive could not be mounted".
Why this was missed
Both #315 and #332 were written on the belief that the engine reported nothing observable, so no post-spawn detection was attempted. That belief was inherited from planning notes and never checked against the engine, which is public. It is false, and the corrected reasoning is recorded in the ValidateRetailArchiveRoots remarks.
Proposed work
- Measure how long an initialisation abort actually takes, and size the detection window from that rather than the current 500 ms guess. Consider waiting for exit-or-settle instead of a fixed delay.
- Match the
[ggc] sentinels in captured stderr and surface a specific message naming the archive.
- Treat the sentinel as advisory, not required: it is fork-only (
StdBIGFileSystem on bobtista/topic/trunk; absent upstream on every platform, including Win32BIGFileSystem — see the correction comment below). Absence of the sentinel must not be read as success.
Windows caveat
ReleaseCrash shows a system-modal dialog before _exit(1), so on Windows a host-launched child blocks instead of exiting. No detection window of any length helps there — GenHub sees a live process indefinitely. That is engine-side work and should not be designed around here beyond not assuming a prompt exit.
Acceptance criteria
- An initialisation abort is reported as a failed launch regardless of how long it takes, not only within a fixed window.
- A mount failure produces a message naming the archive, not a generic non-zero exit.
- Behaviour is unchanged where the sentinel is absent.
Related
Problem
The engine already reports archive failures, and GenHub ignores them.
Verified on
bobtista/GeneralsGameCodeatbobtista/topic/trunk:ReleaseCrashInfo.txt.[ggc] archive identifier mismatch: <file>—StdBIGFileSystem.cpp:203[ggc] ARCHIVE MOUNT FAILED, contents unavailable this run: <file>—StdBIGFileSystem.cpp:357Neither reaches the main loop. GenHub does not use either signal.
Two concrete gaps:
1. The immediate-exit window is 500 ms.
GameProcessManagerwaits 500 ms, then reports"exited immediately with code {ExitCode}"with captured stderr. An initialisation abort landing inside that window is caught and reported well. One landing outside it is reported as a successful launch, and the process then dies unobserved. Whether the engine beats 500 ms on a cold start, a slow disk, or under emulation is unmeasured.2. Nothing branches on the stderr sentinel.
The
[ggc]lines are captured by the stderr work in #332 and surfaced verbatim when the exit is caught, but they are never matched. A launch that mounted nothing is indistinguishable to GenHub from any other non-zero exit, so the user gets a generic failure rather than "this archive could not be mounted".Why this was missed
Both #315 and #332 were written on the belief that the engine reported nothing observable, so no post-spawn detection was attempted. That belief was inherited from planning notes and never checked against the engine, which is public. It is false, and the corrected reasoning is recorded in the
ValidateRetailArchiveRootsremarks.Proposed work
[ggc]sentinels in captured stderr and surface a specific message naming the archive.StdBIGFileSystemonbobtista/topic/trunk; absent upstream on every platform, includingWin32BIGFileSystem— see the correction comment below). Absence of the sentinel must not be read as success.Windows caveat
ReleaseCrashshows a system-modal dialog before_exit(1), so on Windows a host-launched child blocks instead of exiting. No detection window of any length helps there — GenHub sees a live process indefinitely. That is engine-side work and should not be designed around here beyond not assuming a prompt exit.Acceptance criteria
Related