Xcode 27.1 Device Hub crashes immediately when launched, even with no project open

[Submitted as FB24979057]

Device Hub is consistently crashing for me in Xcode 27.1. I initially encountered it while working in Xcode, but I can reproduce it completely independently of any project:

  1. Quit Xcode.
  2. Launch Device Hub directly.
  3. Wait a couple of seconds.
  4. Device Hub crashes.

The latest crash occurred about two seconds after Device Hub launched, so this doesn’t appear to be related to a particular Xcode project. :chatgpt-content-reference{index="0"}

Environment

  • Xcode 27.0 (27A266a)
  • DeviceHub 27.0 (255.2.6.6)
  • macOS 27.0.1 (26A434)
  • Apple silicon

The crash is on the main thread during AppKit/SwiftUI layout and constraint updating: :chatgpt-content-reference{index="1"} :chatgpt-content-reference{index="2"}

Exception Type: EXC_CRASH (SIGABRT)
Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6

AppKit
-[NSWindow(NSDisplayCycle) _postWindowNeedsUpdateConstraints]
-[NSView setNeedsUpdateConstraints:]

SwiftUI
NSHostingView.setNeedsUpdate()
NSHostingView.beginTransaction()
AppKitPlatformViewHost.invalidateLayout()
NSHostingView.SizeConstraints.update(from:)

DeviceHub
main

Has anyone else seen this in Xcode 27.1 or found a workaround?

Found a workaround! 🙌

Reinstalling Xcode didn't help, but clearing Device Hub's own app data did. Its bundle ID is com.apple.dt.Devices, so none of Xcode's prefs are touched.

With Device Hub quit, run these in Terminal:

mv ~/Library/Containers/com.apple.dt.Devices ~/Downloads/com.apple.dt.Devices-backup
mv ~/Library/Preferences/com.apple.dt.Devices.plist ~/Downloads/ && killall cfprefsd

Device Hub launches normally after that. Moving instead of deleting keeps a backup in Downloads in case you want to restore it.

The crash is a layout loop in the split view, so my guess is that restored window state (window size or sidebar width) was the trigger. I had a Studio Display connected, which may be related.

Xcode 27.1 Device Hub crashes immediately when launched, even with no project open
 
 
Q