Repository navigation
Prevent Mac test-host crash after exit-guard window test - #46
Merged
Merged
Conversation
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.
The Mac app test host intermittently crashed after the exit-guard window test. The test creates an
NSWindow, closes it for real, and keeps using a Swift local reference. AppKit defaultsisReleasedWhenClosedtotrue, so the test's final close lets AppKit release a window that the local still owns. This change makes that test-owned window opt out of AppKit's automatic release. Production window behavior is unchanged.Local validation on clean main before the change: the exit-guard and finish-notice suites reproduced a test-host
EXC_BAD_ACCESSinobjc_release, followed by Xcode's automatic test-host restart. The finish-notice suite alone passed. After the change, the exact two-suite reproducer passed 13/13 without a restart, then passed three additional repeat runs. The full serialized Mac app suite passed uninterrupted: 1,156 passed, 13 skipped, 0 failed.git diff --checkpassed. The other Mac tests that create and close their ownNSWindowalready setisReleasedWhenClosed=false.The branch was rebased onto current
mainafter those tests. The only intervening main commit (#43) added opt-in crash evidence, did not touch this test, and independently passed the full serialized Mac suite (1,156 passed, 13 skipped, 0 failed). These local runs are the validation gate; GitHub CI credits are exhausted.