XCPreviewAgent crashes with KERN_PROTECTION_FAILURE on macOS 26.0.1 Tahoe

Hello, I'm experiencing consistent crashes of XCPreviewAgent when using Xcode Previews on macOS 26.0.1 Tahoe (25A362).

Configuration:

  • macOS: 26.0.1 (25A362) - stable release
  • Xcode: 16.0 (23.0.54) - stable release
  • Hardware: MacBook Pro M4
  • Project: SwiftUI iOS app

Issue: Every time I try to use Xcode Previews, XCPreviewAgent crashes with: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Subtype: KERN_PROTECTION_FAILURE at 0x0000000340e54000 Termination Reason: Namespace SIGNAL, Code 10, Bus error: 10 The crash occurs in shared memory region during dynamic library loading. What I've tried:

  • Cleared all caches: rm -rf ~/Library/Developer/Xcode/DerivedData
  • Deleted Preview data: rm -rf ~/Library/Developer/Xcode/UserData/Previews
  • Reset simulators: xcrun simctl --set previews delete all
  • Switched xcode-select to /Applications/Xcode.app/Contents/Developer
  • Tried both Xcode stable and Xcode beta
  • Created fresh simulators
  • Clean build (Cmd+Shift+K)
  • Rebooted Mac multiple times

The app runs fine on simulator (Cmd+R), but Previews consistently crash.

Hi,

Sorry to hear you are having problems getting previews working. If you look into the folder ~/Library/Logs/DiagnosticReports, do you see any crash reports for XCPreviewAgent? If so, would you be able to attach them here?

If not, the best next step will be to file a feedback with diagnostics so we can take a look.

We will need the diagnostics Xcode Previews generates in order to make sure we understand the error the previews system is encountering.

Install the logging profile using instructions available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift On your mac running Xcode, and on your physical preview device (if you are using one).

Install the logging profile using the following instructions on your mac running Xcode; and if you are using one, your physical preview device (iOS or visionOS): https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift

Then when you reproduce the problem in Xcode:

  1. Either (a) an error banner will appear, click the "Diagnostics" button in that banner; or (b) if you're not seeing an error but you still want to provide diagnostics you can get the same diagnostics window by going under the Editor menu in the menu bar, then selecting the Canvas submenu, then selecting "Diagnostics".
  2. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  3. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
  4. Generate a sysdiagnose on your mac and any on-device preview devices, and attach those too
XCPreviewAgent crashes with KERN_PROTECTION_FAILURE on macOS 26.0.1 Tahoe
 
 
Q