Xcode 7.3.1 Error on MacOS Sierra Beta 5

Note. I am using Xcode7.x with MacOS Sierra with Beta 1 or 2. It worked fine. I did not touch Xcode 8 on this machine.

Since beta 5, I can’t do anything with Xcode 7. I launch it and open my workspace, and as soon as I change the view to another file or project or assets or something else, it crashes with the following a mistake

Process: Xcode [869] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 7.3.1 (10188.1) Build Info: IDEFrameworks-10188001000000000~3 App Item ID: 497799835 App External ID: 817226719 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [869] User ID: 501 Date/Time: 2016-08-11 11:21:13.167 -0700 OS Version: Mac OS X 10.12 (16A286a) Report Version: 12 Anonymous UUID: BC13DBAB-4D04-3E83-CF4A-4F1FFB581BCE Time Awake Since Boot: 250 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Note: EXC_CORPSE_NOTIFY VM Regions Near 0x20: --> __TEXT 000000010ce99000-000000010ce9d000 [ 16K] rx/rwx SM=COW /Applications/Xcode.app/Contents/MacOS/Xcode Application Specific Information: ProductBuildVersion: 7D1014 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff8ce08a31 objc_retain + 33 1 com.apple.dt.DVTKit 0x000000010d73838a __38-[DVTSourceTextView setTextContainer:]_block_invoke + 28 2 com.apple.dt.DVTFoundation 0x000000010d0e5e88 __95-[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:withHandlerBlock:]_block_invoke + 91 3 com.apple.dt.DVTFoundation 0x000000010d0e4d2e __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke.195 + 83 4 com.apple.dt.DVTFoundation 0x000000010d00b911 DVTInvokeWithStrongOwnership + 75 5 com.apple.dt.DVTFoundation 0x000000010d0e48c6 -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] + 336 6 com.apple.Foundation 0x00007fff7a0e9dbd NSKeyValueNotifyObserver + 350 7 com.apple.Foundation 0x00007fff7a0e9654 NSKeyValueDidChange + 486 8 com.apple.Foundation 0x00007fff7a2282d7 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 944 9 com.apple.Foundation 0x00007fff7a0ad3c9 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 60 10 com.apple.Foundation 0x00007fff7a115c3b _NSSetObjectValueAndNotify + 261 11 com.apple.CoreFoundation 0x00007fff786cfde7 -[NSArray makeObjectsPerformSelector:withObject:] + 279 12 com.apple.UIFoundation 0x00007fff8ac9282b -[NSLayoutManager setTextStorage:] + 912 13 com.apple.dt.DVTKit 0x000000010d6ad401 -[DVTFoldingLayoutManager setTextStorage:] + 154 14 com.apple.UIFoundation 0x00007fff8ace6515 -[NSTextStorage dealloc] + 117 15 com.apple.dt.DVTKit 0x000000010d64647e -[DVTTextStorage dealloc] + 911 16 com.apple.Foundation 0x00007fff7a11dcbd NSKVODeallocate + 94 17 com.apple.AppKit 0x00007fff76627281 -[NSTextView dealloc] + 813 18 com.apple.dt.DVTKit 0x000000010d803030 -[DVTCompletingTextView dealloc] + 120 19 com.apple.AppKit 0x00007fff76427a96 -[NSTextView release] + 464 20 libsystem_blocks.dylib 0x00007fff8d728952 _Block_release + 102 21 libsystem_blocks.dylib 0x00007fff8d728952 _Block_release + 102 22 libdispatch.dylib 0x00007fff8d6d9c6f _dispatch_source_handler_dispose + 23 23 libdispatch.dylib 0x00007fff8d6c9da3 _dispatch_source_cancel_callout + 90 24 libdispatch.dylib 0x00007fff8d6c0a6e _dispatch_source_invoke + 1512 25 libdispatch.dylib 0x00007fff8d6cba0f _dispatch_main_queue_callback_4CF + 505 26 com.apple.CoreFoundation 0x00007fff7870bd39 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 27 com.apple.CoreFoundation 0x00007fff786cd15d __CFRunLoopRun + 2205 28 com.apple.CoreFoundation 0x00007fff786cc664 CFRunLoopRunSpecific + 420 29 com.apple.HIToolbox 0x00007fff77c6ef7c RunCurrentEventLoopInMode + 240 30 com.apple.HIToolbox 0x00007fff77c6edb1 ReceiveNextEventCommon + 432 31 com.apple.HIToolbox 0x00007fff77c6ebe6 _BlockUntilNextEventMatchingListInModeWithFilter + 71 32 com.apple.AppKit 0x00007fff76365c41 _DPSNextEvent + 1093 33 com.apple.AppKit 0x00007fff76a75693 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1637 34 com.apple.dt.DVTKit 0x000000010d601439 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 396 35 com.apple.AppKit 0x00007fff7635a610 -[NSApplication run] + 926 36 com.apple.AppKit 0x00007fff763250e2 NSApplicationMain + 1237 37 com.apple.dt.Xcode 0x000000010ce9a39b 0x10ce99000 + 5019 38 libdyld.dylib 0x00007fff8d6f4255 start + 1 

Does anyone else encounter this in beta 5?

+5
source share
3 answers

From the macOS Sierra beta 5 release notes:

Xcode Xcode 7.3.1 is not compatible with macOS Sierra. Workaround: Use Xcode 8.0 beta or later when working on macOS Sierra.

It should be possible to use swift 2.3 in xcode 8. From beta 6:

For macOS Sierra developers, we recommend switching to Xcode 8. You can continue development with the release of Swift 2.x with the Swift 2.3 compiler enabled until you are ready to upgrade to Swift 3. Xcode 7.3.1 is not supported on macOS Sierra. (27224895)

+5
source

With stable Mac OS X Sierra (v10.12), Xcode 7.3.1 started working on its third launch. Everything seems to be working fine, no problems with the emulator or anything else!

Do not lose hope if Xcode does not work the first time you start :)

+3
source

I was able to recreate the same specific problem (DVTSourceTextView setTextContainer) on Mac OS Sierra (not beta) for xcode 7.3.1. Oddly enough, I found this somehow attributed to my Cocoapods implementation. I was able to open the project, but not the workspace. I deleted my workspace and Pods directory, then performed a pod installation to redo it.

Then the problem was fixed. Lost a couple of days of research work, hoping that this will help someone.

0
source