Fix Windows crash after folder selection - #619
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.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.
Summary
Fix the Windows production crash after accepting a folder in the native
IFileOpenDialog. The selected path is now owned across a posted application message so project registration and workspace/focus changes begin only after USER32 has unwound the originatingWM_COMMANDcallback.Current
origin/main(b582fac93e0cf4bb3788e64e646e9a7f2d1063f4) contains the same Windows picker path as immutable beta3 (0958109ee41c7215e3ccf91319e5a102d0fb7069); no existing fix was duplicated. The immutable beta3 candidate remains failed and unchanged.This PR claims only
graphcode-windows/src/App.zig; it does not modify #587's harness files or #560's deferred Worktrees scope.Changes
WM_APPcompletion message is dispatchedTest plan
RED: $env:GRAPHCODE_ZIG0152 test src\App.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -ladvapi32 -lole32 -lshell32 -lcomctl32 -I $env:GRAPHCODE_WINGHOSTTY_ROOT\include --test-filter "folder picker completion waits for native callback unwind" -> 1/1 failed: expected 1, found 0
GREEN: $env:GRAPHCODE_ZIG0152 test src\App.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -ladvapi32 -lole32 -lshell32 -lcomctl32 -I $env:GRAPHCODE_WINGHOSTTY_ROOT\include --test-filter "folder picker completion waits for native callback unwind" -> 1/1 passed
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task windows-shell -SkipTrayLive -SwiftExecutable $env:GRAPHCODE_SWIFT633 -> exit 0; 52/52 source sections, App 736/736, Worktree Git 21/21, smoke/stress and live UIA passed
The ReleaseSafe development layout also built successfully with
pwsh -NoProfile -File Tools\windows\dev.ps1 -Build. The full gate ran from a short session-owned validation worktree because the project worktree exceeds legacy fixture path budgets; its default profile remained unchanged.Full attended selection through the native picker with physical keyboard input was not executed in this coding-agent session. The focused regression uses a real hidden Win32 window and message queue to reach the proven callback-lifetime transition; the live UIA gate separately verified picker cancellation and unrelated menus/navigation. No Dev Box return bundle, preserved evidence, installed candidate, or release artifact was read or modified.
This fix is sufficient to build a replacement candidate for a fresh D6 rerun. It does not make immutable
0.1.78-beta3pass.Checklist
git commit -s) per the DCOmake test)make check)