Skip to content

bugfix(gamewindowmanager): Fix crash on game launch from wrong path handling in GameWindowManager::winCreateFromScript() - #3595

Merged
xezon merged 1 commit into
TheSuperHackers:mainfrom
xezon:xezon/fix-windowmanager-path
Oct 25, 2026
Merged

xezon merged 1 commit into
TheSuperHackers:mainfrom
xezon:xezon/fix-windowmanager-path

Conversation

@xezon

@xezon xezon commented Oct 25, 2026

Copy link
Copy Markdown

Generals and Zero Hour crash on launch because WND files can no longer be found in Window\ subfolders. This behavior was introduced by #3362 and is reverted to what it did originally.

The window it tries to find is: "Menus/BlankWindow.wnd"

Crash callstack

>	generalsv.exe!WindowLayout::hide(bool hide) Line 79	C++	Symbols loaded.
 	generalsv.exe!GameLogic::prepareNewGame(GameMode gameMode, GameDifficulty diff, int rankPoints) Line 331	C++	Symbols loaded.
 	generalsv.exe!GameLogic::onNewGame(GameMessage * msg) Line 899	C++	Symbols loaded.
 	generalsv.exe!GameLogic::logicMessageDispatcher(GameMessage * msg, void * userData) Line 440	C++	Symbols loaded.
 	generalsv.exe!GameLogic::processCommandList(CommandList * list) Line 2312	C++	Symbols loaded.
 	generalsv.exe!GameLogic::update() Line 3291	C++	Symbols loaded.
 	generalsv.exe!SubsystemInterface::UPDATE() Line 73	C++	Symbols loaded.
 	generalsv.exe!GameEngine::update() Line 757	C++	Symbols loaded.
 	generalsv.exe!Win32GameEngine::update() Line 91	C++	Symbols loaded.
 	generalsv.exe!GameEngine::execute() Line 819	C++	Symbols loaded.
 	generalsv.exe!GameMain() Line 55	C++	Symbols loaded.
 	generalsv.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 889	C++	Symbols loaded.
 	generalsv.exe!invoke_main() Line 107	C++	Non-user code. Symbols loaded.
 	generalsv.exe!__scrt_common_main_seh() Line 288	C++	Non-user code. Symbols loaded.
 	generalsv.exe!__scrt_common_main() Line 331	C++	Non-user code. Symbols loaded.
 	generalsv.exe!WinMainCRTStartup(void * __formal) Line 17	C++	Non-user code. Symbols loaded.
 	kernel32.dll!764b5d49()	Unknown	Non-user code. Cannot find or open the PDB file.
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]		Annotated Frame
 	ntdll.dll!77dbc75b()	Unknown	Non-user code. Cannot find or open the PDB file.
 	ntdll.dll!77dbc6e1()	Unknown	Non-user code. Cannot find or open the PDB file.

@xezon xezon added Blocker Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour ThisProject The issue was introduced by this project, or this task is specific to this project Crash This is a crash, very bad labels Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: df1ade96-9433-4758-81bf-a94b363030c2
Commits

Reviewing files that changed from the base of the PR and between 24db050 and 2b09cac.

Files selected for processing: 1
  • Core/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Walkthrough

winCreateFromScript now checks specifically for a backslash when deciding whether to prefix a filename with Window\. Paths containing only forward slashes now take the prefix branch.

Changes

Script window path handling

Layer / File(s) Summary
Window path prefix check
Core/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp
winCreateFromScript now checks for a backslash directly. Paths containing only / are prefixed with Window\.

Priority: High

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: bobtista

Merge Risk: Minimal · up to 2b09c

No actionable merge-blocking risk remains for this path-handling fix.

Pre-merge checks: Passed 4
Check name Status Explanation
Description check Passed The description directly explains the launch crash, affected WND paths, regression source, and intended fix.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the bug fix, the affected component, and the crash caused by incorrect path handling in GameWindowManager::winCreateFromScript().
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The change appears safe to merge.

Summary

Restores the Window\ prefix for forward-slash menu paths passed to GameWindowManager::winCreateFromScript().

  • Window scripts with forward slashes now load from the Window folder.

Reviews (1) · Last reviewed commit: "bugfix(gamewindowmanager): Fix wrong pat..." · Reviewed by Greptile

@bobtista bobtista left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works - tested locally, sorry for introducing the bug!

@xezon xezon changed the title bugfix(gamewindowmanager): Fix wrong path handling in GameWindowManager::winCreateFromScript() bugfix(gamewindowmanager): Fix crash on game launch from wrong path handling in GameWindowManager::winCreateFromScript() Oct 25, 2026
@xezon
xezon merged commit 76d29a7 into TheSuperHackers:main Oct 25, 2026
28 checks passed
@xezon
xezon deleted the xezon/fix-windowmanager-path branch October 25, 2026 15:32
gamezerve pushed a commit to gamezerve/Reborn-Omega that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocker Severity: Minor < Major < Critical < Blocker Crash This is a crash, very bad Gen Relates to Generals ThisProject The issue was introduced by this project, or this task is specific to this project ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants