Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Preview crash in Xcode 27 / iOS 27 simulator — segfault in libobjc map_images inside XCPreviewAgent's JIT-compiled preview binary (works with "Use Legacy Preview Execution")
Thanks for the quick look. I've filed Feedback FBxxxxxxxx with preview diagnostics and a sysdiagnose attached. I can't share the project itself because it's proprietary, so here is a summary of what I found while narrowing it down. Environment: Xcode 27, macOS 27.0 (26A428), iOS 27.0 simulator (24A434), iPhone 18 Pro. What fails: With the default (non-legacy) preview execution, previews of a SwiftUI view in a large app target fail. There are two failure modes, both on the same target: XCPreviewAgent crashes (SIGSEGV), either in swift_conformsToProtocolMaybeInstantiateSuperclasses or in readClass ← map_images_nolock ← _objc_map_images. In the second case the frame above libobjc resolves to an anonymous image with no path or UUID (source: "A"), which looks like the JIT-compiled preview binary from XOJITExecutor. Other attempts on the same scheme end in TaskTimeoutError with no crash report. What I've ruled out: The same view previews fine on a small app target with far fewer linked frameworks, and the crash happens across unrelated views. Removing one heavy third-party SDK from the previewed module did not change the crash, and that SDK never appears in the crashing stack frames. Enabling "Use Legacy Preview Execution" makes the crash go away with no other changes. So this looks tied to the size of the linked dependency graph in the new execution path, not to the view's code. The diagnostics zip and sysdiagnose in the Feedback were sanitized of project-identifying strings on a best-effort basis. Happy to run more diagnostics if useful. i got the files but i cant upload them here as zip or ips or gz, what should i do?
Sep ’26
Reply to SwiftUI Preview crash in Xcode 27 / iOS 27 simulator — segfault in libobjc map_images inside XCPreviewAgent's JIT-compiled preview binary (works with "Use Legacy Preview Execution")
Thanks for the quick look. I've filed Feedback FBxxxxxxxx with preview diagnostics and a sysdiagnose attached. I can't share the project itself because it's proprietary, so here is a summary of what I found while narrowing it down. Environment: Xcode 27, macOS 27.0 (26A428), iOS 27.0 simulator (24A434), iPhone 18 Pro. What fails: With the default (non-legacy) preview execution, previews of a SwiftUI view in a large app target fail. There are two failure modes, both on the same target: XCPreviewAgent crashes (SIGSEGV), either in swift_conformsToProtocolMaybeInstantiateSuperclasses or in readClass ← map_images_nolock ← _objc_map_images. In the second case the frame above libobjc resolves to an anonymous image with no path or UUID (source: "A"), which looks like the JIT-compiled preview binary from XOJITExecutor. Other attempts on the same scheme end in TaskTimeoutError with no crash report. What I've ruled out: The same view previews fine on a small app target with far fewer linked frameworks, and the crash happens across unrelated views. Removing one heavy third-party SDK from the previewed module did not change the crash, and that SDK never appears in the crashing stack frames. Enabling "Use Legacy Preview Execution" makes the crash go away with no other changes. So this looks tied to the size of the linked dependency graph in the new execution path, not to the view's code. The diagnostics zip and sysdiagnose in the Feedback were sanitized of project-identifying strings on a best-effort basis. Happy to run more diagnostics if useful. i got the files but i cant upload them here as zip or ips or gz, what should i do?
Replies
Boosts
Views
Activity
Sep ’26