bugfix(debug): Skip system-modal crash dialogs in headless runs - #3030
Merged
xezon merged 1 commit intoJul 31, 2026
Merged
Conversation
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Source/Common/System/Debug.cpp | Adds headless-mode guards around all system-modal crash dialogs without altering crash-reporting or termination paths. |
Reviews (2): Last reviewed commit: "bugfix(system): Skip system-modal crash ..." | Re-trigger Greptile
xezon
reviewed
Jul 31, 2026
bobtista
force-pushed
the
bobtista/bugfix/headless-crash-dialogs
branch
from
July 31, 2026 19:25
b69a40d to
5097c1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ReleaseCrashandReleaseCrashLocalizedcallMessageBoxeven when the game runs with-headless. The system-modal dialog blocks_exit(1), leaving an unattended process alive until somebody dismisses it.Now only the dialog calls are skipped when
TheGlobalData->m_headlessis set. Crash reporting, minidump generation, and_exit(1)remain unchanged.Todo:
-headlessis parsed before subsystem initialization failures-headlessinitialization failure exits 1, writesReleaseCrashInfo.txt, and shows no UI-headlessretains the existing dialog-headlessrun remains unaffectedVerification (Windows, MSVC x86)
Built
z_generalsin bothwin32-debug(RTS_DEBUG) andwin32Releaseso both sides of the#if defined(RTS_DEBUG)split are covered. A subsystem initialization failure was induced by putting an invalid Bool (UseTrees = Maybe) in the install's looseData\INI\GameData.ini, which makesINI::scanBoolthrow, gets rethrown asINIException, and lands inGameEngine::init'scatch (INIException)handler.ReleaseCrashInfo.txtwritten, no windowReleaseCrashInfo.txtwritten, no window-headless-replay ... -headless)Pre-fix control: reverting
Debug.cppand rebuilding reproduces #3029 — the headless process stays alive on a visible system-modal dialog with no game window, and only exits once the dialog is dismissed by hand.-headlessis parsed byparseCommandLineForStartupinWinMainbeforeGameMain, som_headlessis already set whenGameEngine::initloads INI data.Note on
TheGlobalData == nullptrReleaseCrashalready returns early whenTheGlobalDatais null, before reaching eitherMessageBox, so crashes that early show no dialog at all today. The null check in the new guards is therefore only meaningful inReleaseCrashLocalized, where the dialog precedes the firstTheGlobalDatadereference. It is kept in all three for consistency.