Repository navigation
Fix the crash on a real Photos drag - #41
Merged
Merged
Conversation
`ImageDrop` is `@MainActor`, so the reader closure handed to `receivePromisedFiles` is main-actor isolated; Swift 6 checks that when the closure runs. Handed a private `OperationQueue`, the first real Photos drag died in `dispatch_assert_queue` (LUTzy-2026-09-13-093026.ips). The reader only yields into an `AsyncStream`, so it runs on `.main` now. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ViSYWttguWwFQm1PEksQ7K
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 file-promise reader in
ImageDrop.receiveis main-actor isolated (the enum is@MainActor), but it was handed a privateOperationQueue, so Swift 6's isolation check trapped the moment Photos delivered the file. The crash report from this morning's drag (LUTzy-2026-09-13-093026.ips) shows_swift_task_checkIsolatedSwiftunder the reader closure. The reader only yields into anAsyncStream, so it now runs onOperationQueue.main.Follow-up to #37. Not reproducible in a unit test: only a live drag session vends an
NSFilePromiseReceiver.Test plan
ImageDropTestspass.🤖 Generated with Claude Code
https://claude.ai/code/session_01ViSYWttguWwFQm1PEksQ7K