Skip to content

tiny_game_abort_test: keep the native fail-fast runs out of Windows Error Reporting, so no tiny_game.exe is left locked - #6460

Open
kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:tiny-abort-no-wer
Open

kingzzim7-create wants to merge 1 commit into
ItsNotRexed:mainfrom
kingzzim7-create:tiny-abort-no-wer

Conversation

@kingzzim7-create

Copy link
Copy Markdown
Contributor

Claimed in #6214 (new TEST item, finding posted there). The test was added in #3928.

Problem. run_tiny_game_abort_exit_codes runs tiny_game natively in five abort modes. Three of them (abort-return, abort-ignore, abort-default) end with the UCRT fail-fast, 0xC0000409, and each is reported to Windows Error Reporting. On this machine every report leaves the exited child as a zombie process (44-48 KB, 0 CPU time, user N/A) that taskkill /F refuses with "Access is denied". It holds tiny_game.exe open, so the next build fails at that target with LNK1168 until a reboot. The test itself passes.

Change. The test calls SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX) before it starts any child. Every child inherits it, so the fail-fast children end without a WER report. Nothing else changes: the expected exit codes stay the same (native 0xC0000409, gta6rt 3 and 43), and nothing outside the process is touched (no registry WER exclusion).

Tested on Windows 11 26300, MSVC 14.52, against main 561b65a's own gta6rt.exe and tiny_game.exe:

tiny_game.exe left behind Application-log events for tiny_game checks
main's test +3 (9 -> 12) 6 (3x event 1000, 3x WER event 1001) 10/10 PASS
this change +0 (9 -> 9) 0 10/10 PASS

The changed test was compiled outside the tree (cl /W4 /O2 /std:c++17, with the same WIN32_LEAN_AND_MEAN/NOMINMAX defines as CMake), because the processes main's test leaves behind lock the in-tree tiny_game.exe. Its source is identical to this commit.

Also measured: of the 14 run_tiny_* tests, only this one leaves a process behind, and a full ctest -j4 run added exactly 3. Excluding tiny_game.exe from WER in the registry instead gives the same result (9 -> 9), which confirms WER as the cause.

No game files, no GPU needed. AI-assisted (Claude).

🤖 Generated with Claude Code

https://claude.ai/code/session_0169um2NBao5UtDE866zCSLX

…rror Reporting

The three native fail-fast cases (abort-return, abort-ignore, abort-default) were each reported to WER, which left the exited child as a zombie holding tiny_game.exe open, so the next build failed with LNK1168. The test now sets SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX before starting any child; the expected exit codes are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ingenioeren

Copy link
Copy Markdown
Contributor

Tested cd58a99 with a native Windows build (Windows 11 build 26200, MSVC 19.43, SDK 10.0.26100, Ninja RelWithDebInfo). run_tiny_game_abort_exit_codes passed 3/3 consecutive runs, covering all five cases natively and under the shim. Afterward no process from the built fixture remained, and I could reopen that tiny_game.exe for read/write with FileShare.None. I used the PR's per-process error mode and made no WER registry changes. Synthetic fixture only, AI-assisted.

@kingzzim7-create

Copy link
Copy Markdown
Contributor Author

Thanks @Ingenioeren for the independent run, especially the exclusive reopen of tiny_game.exe, which is the part that used to fail.

AI-assisted (Claude)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants