Repository navigation
Fix DynamicLibrary test hang on the VS 2026 CI runner - #230
Merged
Merged
Conversation
LoadLibrary on a file that is not a valid DLL opens a modal "Bad Image" dialog unless the error mode has SEM_FAILCRITICALERRORS. The process error mode comes from the parent. Git Bash and CTest 3 set it, CTest 4 does not, so on the VS 2026 runner (CTest 4.4) the DynamicLibrary test waited for a click until the CTest timeout. Open and OpenSigned now set the error mode of the calling thread around the load and restore it after. A new test turns dialogs on for its thread before it loads a bad image, so the test does not depend on the launcher. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Fixes the red
mainCI since #220: both Windows MSVC 2026 jobs time out on theDynamicLibrarytest.Root cause
The test loads a fake 4-byte "DLL" through
DynamicLibrary::Open.LoadLibraryWon a bad image opens a modal "Bad Image" (0xc0000130) dialog unless the error mode hasSEM_FAILCRITICALERRORS. The process error mode comes from the parent:windows-2025-vs2026image) does not, so the dialog opens on a headless runner and the test waits until the 300 s timeout.Reproduced locally with the same
CoreTests.exe: it passes directly and under CTest 3.29, and shows the dialog and hangs under VS 2026's CTest 4.3.1.Fix
OpenandOpenSignedsetSEM_FAILCRITICALERRORSwithSetThreadErrorModearound the load and restore the caller's mode after. This is per thread, so no process-wide state changes. A corrupt DLL in a shipped game no longer blocks on a dialog either.Verified locally (VS 2026, Debug)
DynamicLibrarypasses under CTest 4.3.1 (0.03 s), under CTest 3.29, and run directly.check_comment_style.pyare clean.#229 (the diagnostic branch) can be closed after this merges.
🤖 Generated with Claude Code