Repository navigation
fix(shutdown): join engine workers after runtime state resets - #7
Merged
Merged
Conversation
Co-Authored-By: Codex <codex@openai.com>
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.
HL 3266 resets
CEngine::GetState()toDLL_INACTIVEbefore the launcher callsExitGame. ThreadGuard's close/restart gate then skipped its general engine-worker join, allowing old Steam discovery workers to outlive the engine heap during_restart. A captured worker faulted while returning invalid WSABUF storage to the small-block allocator, leaving its lock held; later CRT cleanup looped inSleep(128).Use the
ExitGamelifecycle boundary to always request and join the engine manager before CRT detach. Keep the earlier GameUI/ServerBrowser unload gates and NET_Shutdown ordering. Add a real-worker regression covering inactive, close, restart and active states, absent engine/manager, and repeated calls; update both READMEs and repository guidance.Validation:
de_dust2 -> _restart -> quitruns exited 0 without the previously captured access violations or heap-corruption exception. No debugger state override was used.osprey -> _restart -> quit, exited 0.git diff --checkpasses.The separately observed earlier
0xc0000374reload crash is not independently proven to have this cause. This change does not claim to resolve every HL 3266 restart failure.Real-fixture investigation and verification record: MetaHookSv/MetaHook#6.