Skip to content

fix(headless): Set DX8Wrapper_IsWindowed to false to suppress assertion dialogs during shutdown#2298

Open
bobtista wants to merge 4 commits intoTheSuperHackers:mainfrom
bobtista:bobtista/fix-headless-assert-dialogs
Open

fix(headless): Set DX8Wrapper_IsWindowed to false to suppress assertion dialogs during shutdown#2298
bobtista wants to merge 4 commits intoTheSuperHackers:mainfrom
bobtista:bobtista/fix-headless-assert-dialogs

Conversation

@bobtista
Copy link

Summary

  • Set DX8Wrapper_IsWindowed to false in headless mode so ignoringAsserts() works - particularly during shutdown after TheGlobalData has been destroyed.

Testing

  • Run headless replay to completion (-replay test.rep -headless -ignoreAsserts)
  • Verify no assertion dialogs appear during shutdown

@greptile-apps
Copy link

greptile-apps bot commented Feb 12, 2026

Greptile Summary

Refactored headless mode initialization by moving the DX8Wrapper_IsWindowed fix from WinMain.cpp into the parseHeadless() function in CommandLine.cpp. This consolidates headless-related initialization logic in one place and makes the code cleaner. The fix addresses a critical issue where assertion dialogs could appear during shutdown in headless mode after TheGlobalData is destroyed, by ensuring ignoringAsserts() returns early without accessing the destroyed object.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is a clean refactoring that moves existing, tested code to a more appropriate location. The original fix was already tested and merged (commit 6826644), and this PR simply relocates it to consolidate headless initialization logic. No behavioral changes are introduced.
  • No files require special attention

Important Files Changed

Filename Overview
GeneralsMD/Code/GameEngine/Source/Common/CommandLine.cpp Moved DX8Wrapper_IsWindowed initialization from WinMain into parseHeadless() for better code organization

Last reviewed commit: 3e96876

@xezon xezon added Debug Is mostly debug functionality Fix Is fixing something, but is not user facing labels Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Debug Is mostly debug functionality Fix Is fixing something, but is not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants