5

Note: I have been using Xcode7.x with MacOS Sierra since Beta 1 or 2. It's worked just fine. I haven't touched Xcode 8 on this machine.

Since beta 5, suddenly I can't do anything with Xcode 7. I start it up and open my workspace and as soon as I change the view to another file or project or assets or anything, it crashes with the following error:

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] r-x/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

Anyone else come across this in beta 5?

4
  • And yes I've tried turning it off and on again =/
    – valheru
    Aug 11, 2016 at 18:30
  • 2
    I've been able to recreate this same particular issue (DVTSourceTextView setTextContainer) in Mac OS Sierra (non beta) for xcode 7.3.1. Oddly, I found it somehow attributed to my Cocoapods implementation. I was able to open up the project but not the workspace. I deleted my workspace and Pods directory then did a pod install to redo it. The issue was fixed then. Lost a couple days of work researching, hoping this helps someone.
    – Evan Anger
    Oct 2, 2016 at 14:20
  • oh interesting. Thanks!
    – valheru
    Oct 2, 2016 at 16:22
  • @EvanAnger Please turn your comment into an answer.
    – Johan Kool
    Nov 16, 2017 at 10:30

3 Answers 3

5

From 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 running on macOS Sierra.

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

For developers on macOS Sierra it is recommended that you move to Xcode 8. You can continue to develop with the Swift 2.x release with the included Swift 2.3 compiler until you are ready to migrate to Swift 3. Xcode 7.3.1 is not supported on macOS Sierra. (27224895)

3
  • Ughhhhh seems to be the answer but I'm not happy about it
    – valheru
    Aug 11, 2016 at 19:01
  • Today is Oct 10, and i am using official version of Sierra. After I updated to Sierra, it patched my Xcode(current ver 7.3.1), I assume Xcode 7.3.1 is compatible with Sierra now. However, this crash problem shows again, but only after I clicked my plist file. Anyone facing the same issue? Oct 10, 2016 at 19:33
  • @developer Sheldon me too also facing this issue. :(
    – Sawan Cool
    Dec 28, 2017 at 15:29
4

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

Don't lose hope if Xcode doesn't work on the first launch :)

3
  • Hi, does it works till today? As I need to support iOS6, I need XCode 7.3.1 to run if I upgrade to Sierra..
    – neobie
    Nov 8, 2016 at 6:44
  • @neobie Yes it does! Make sure that you don't use both versions (7.3.1 and 8.x.x) at the same time, at least for same XCode projects. Otherwise you might encounter really strange issues.
    – attekei
    Nov 28, 2016 at 1:06
  • I find that Xcode will run okay, but instruments will not Dec 29, 2016 at 12:48
0

I've been able to recreate this same particular issue (DVTSourceTextView setTextContainer) in Mac OS Sierra (non beta) for xcode 7.3.1. Oddly, I found it somehow attributed to my Cocoapods implementation. I was able to open up the project but not the workspace. I deleted my workspace and Pods directory then did a pod install to redo it.

The issue was fixed then. Lost a couple days of work researching, hoping this helps someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.