Repository navigation
The Windows engine player starts: no more 0xC0000409 crash before main reads its arguments - #615
Merged
Merged
Conversation
MSVC treats _IOLBF as full buffering and rejects setvbuf size 0 with a fail-fast 0xC0000409, so the win32 player died in main() before any output. Windows now writes stdout unbuffered. The release job starts every player with an unknown flag.
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.
What is this PR about?
The published
win32-x64engine player (0.3.11) crashes on every start with0xC0000409and prints nothing. This happens even with an unknown flag. Fixes #614.Why does it matter?
No ThreeNative desktop game can run on Windows. The store builds
windows-x64games, and each one would crash on launch.Root cause
v8_main.cppbeginsmain()withstd::setvbuf(stdout, nullptr, _IOLBF, 0). glibc accepts that. MSVC treats_IOLBFas full buffering and requires2 <= size. Size 0 goes to the CRT invalid-parameter handler, which fails fast:FAIL_FAST_INVALID_ARG_c0000409.The fix: Windows writes stdout unbuffered (
_IONBF). That keeps the original intent, a live log that a killed player does not lose. Linux and macOS are unchanged.Proof
windows-latest): bucketFAIL_FAST_INVALID_ARG_c0000409, stackmain → CRT → __fastfail, for--bogus-flagtoo. https://github.com/ThreeNativeHQ/threenative-store/actions/runs/41963721835clonwindows-latest:setvbuf(stdout, NULL, _IOLBF, 0)→0xC0000409, no output ❌._IONBF→ exit 0 and output ✅. https://github.com/ThreeNativeHQ/threenative-store/actions/runs/41963902559TN_PLAYER_V8_ARGS: unknown argument --tn-smoke.Lock
native-release.ymlnow starts every built player with--tn-smokeand expects exit 2 with that message. Before this, nothing ran the Windows player.release-prooflabel runs it, but that is the most expensive board in this repo, so the owner decides.