Xcode randomly crashes without generating a crash report

Originator:macmade
Number:rdar://32839298 Date Originated:June 18 2017, 4:30 PM
Status:Duplicate (32217326) Resolved:
Product:Developer Tools Product Version:
Classification:Crash Reproducible:Sometimes
 
Summary:

I'm experiencing random crashes with Xcode 9 beta, while using the text editor.
This happens on some projects, when I try to command-click on a symbol.

Xcode simply quits, and no crash report is generated.

I can get more infos about the crash running Xcode in LLDB.
Attached is LLDB session log.

--------------------------------------------------

Steps to Reproduce:

In the text editor, command-click on a symbol.

--------------------------------------------------

Expected Results:

The symbol action popover should open.

--------------------------------------------------

Observed Results:

Xcode sometimes quit, without generating a crash report.

--------------------------------------------------

Version:

Xcode Version 9.0 beta (9M136h)
macOS Version 10.13 Beta (17A264c)

--------------------------------------------------

Attached file:

Process 81331 launched: '/Applications/Xcode-beta.app/Contents/MacOS/Xcode' (x86_64)
2017-06-18 16:26:09.787877+0200 Xcode[81331:2920839] Calling IOPPFGetProperty thermally_optimized_xcode!
2017-06-18 16:26:11.542224+0200 Xcode[81331:2920986] Calling IOPPFGetProperty simulator_utility_clamp!
CoreData: annotation:  Failed to load optimized model at path '/Applications/Xcode-beta.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/CrashDatabaseModel.momd/CrashDatabaseModel-5.0.1.omo'
2017-06-18 16:26:14.415518+0200 Xcode[81331:2920839] Unknown class GPUTesselationSliderCell in Interface Builder file.
2017-06-18 16:26:15.166370+0200 Xcode[81331:2920839] Unknown class GPUTesselationSliderCell in Interface Builder file.
2017-06-18 16:26:15.221728+0200 Xcode[81331:2920988] [default] [ERROR] Failed getting container for URL: file:///Users/macmade/Documents/Macmade/GitHub/dyld_cache_extract/dyld_cache_extract.xcodeproj/, error: Error Domain=BRCloudDocsErrorDomain Code=12 "App library not found: 'com.apple.Documents'" UserInfo={NSDescription=App library not found: 'com.apple.Documents'}
2017-06-18 16:26:15.222259+0200 Xcode[81331:2921541] [default] [ERROR] Failed getting container for URL: file:///Users/macmade/Desktop/OpenPanelBug/OpenPanelBug.xcodeproj/, error: Error Domain=BRCloudDocsErrorDomain Code=12 "App library not found: 'com.apple.Desktop'" UserInfo={NSDescription=App library not found: 'com.apple.Desktop'}
2017-06-18 16:26:15.222657+0200 Xcode[81331:2921542] [default] [ERROR] Failed getting container for URL: file:///Users/macmade/Documents/Macmade/GitHub/NSPair/NSPair.m, error: Error Domain=BRCloudDocsErrorDomain Code=12 "App library not found: 'com.apple.Documents'" UserInfo={NSDescription=App library not found: 'com.apple.Documents'}
2017-06-18 16:26:15.223061+0200 Xcode[81331:2921544] [default] [ERROR] Failed getting container for URL: file:///Users/macmade/Documents/Macmade/GitHub/NSPair/NSPair.h, error: Error Domain=BRCloudDocsErrorDomain Code=12 "App library not found: 'com.apple.Documents'" UserInfo={NSDescription=App library not found: 'com.apple.Documents'}
2017-06-18 16:26:15.223379+0200 Xcode[81331:2921543] [default] [ERROR] Failed getting container for URL: file:///Users/macmade/Documents/Macmade/GitHub/GitHubUpdates/TestApp.xcodeproj/, error: Error Domain=BRCloudDocsErrorDomain Code=12 "App library not found: 'com.apple.Documents'" UserInfo={NSDescription=App library not found: 'com.apple.Documents'}
2017-06-18 16:26:15.623291+0200 GPUToolsAgent[81338:2921557] Mac Agent inited !!!
2017-06-18 16:26:15.774361+0200 Xcode[81331:2920966] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-06-18 16:26:15.810929+0200 Xcode[81331:2921543] [] network_config_register_boringssl_log_debug_updates Failed to register for BoringSSL log debug updates
2017-06-18 16:26:16.293926+0200 Xcode[81331:2921550] IDESourceKit warning: Response error occurred for request 'NotifyActiveRunDestinationDidChange': Error Domain=IDESourceKitResponseErrorDomain Code=3 "Indexer token was not valid: 1" UserInfo={NSLocalizedDescription=Indexer token was not valid: 1}
2017-06-18 16:26:17.283040+0200 Xcode[81331:2920839] Could not find image named 'DVTInFieldChooseButtonSmall'.
2017-06-18 16:26:17.565922+0200 Xcode[81331:2921540] IDESourceKit warning: Response error occurred for request 'NotifyActiveRunDestinationDidChange': Error Domain=IDESourceKitResponseErrorDomain Code=3 "Indexer token was not valid: 2" UserInfo={NSLocalizedDescription=Indexer token was not valid: 2}
2017-06-18 16:26:18.050557+0200 Xcode[81331:2920839] Asking for _computePreferredTargets
2017-06-18 16:26:18.050698+0200 Xcode[81331:2920839] Asking for _computePreferredTargets
2017-06-18 16:26:18.454337+0200 Xcode[81331:2920839] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13158.24/IDEKit/NavigableItems/IDENavigableItem.m:1170
Details:  No match from <IDEFileReferenceNavigableItem 0x13b4c0650: (supports Any IDEFileReference, represents: <Xcode3FileReference, 0x11dc6a7a0 (Represents: <PBXFileReference:0x11dc1b2c0:05A5D3BE1EF6C1A6005AF576:name='ViewController.m'>)>)> to <IDEPegasusSourceEditor.SourceCodeLandmark: 0x13af5c7b0>. Iterating the whole tree might have taken a significant amount of time.
Object:   <IDEFileReferenceNavigableItem_Xcode3FileReference_Any: 0x13b4c0650>
Method:   -_descendantItemForRepresentedObject:stopAtClass:
Thread:   <NSThread: 0x10ab00990>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
objc[81331]: __weak variable at 0x1306b7c80 holds 0x7fffcee79160 instead of 0x12fb556c0. This is probably incorrect use of objc_storeWeak() and objc_loadWeak(). Break on objc_weak_error to debug.

2017-06-18 16:26:19.455592+0200 Xcode[81331:2920839] QUERY COMPLETED: Indexing Text: 1.4746 seconds
2017-06-18 16:26:19.526465+0200 Xcode[81331:2920839] QUERY COMPLETED: Indexing Text: 1.3838 seconds
Process 81331 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000011b32b6ae SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).layout(inlineContainerLozenge: SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).LozengeContext, in: SourceEditor.SourceEditorContentView) -> () + 7518
SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).layout(inlineContainerLozenge: SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).LozengeContext, in: SourceEditor.SourceEditorContentView) -> ():
->  0x11b32b6ae <+7518>: ud2    
    0x11b32b6b0 <+7520>: ud2    
    0x11b32b6b2 <+7522>: nopw   %cs:(%rax,%rax)

SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).layout(containerLozenge: SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).LozengeContext, in: SourceEditor.SourceEditorContentView) -> ():
    0x11b32b6c0 <+0>:    pushq  %rbp
Target 0: (Xcode) stopped.

(lldb) bt

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x000000011b32b6ae SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).layout(inlineContainerLozenge: SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).LozengeContext, in: SourceEditor.SourceEditorContentView) -> () + 7518
    frame #1: 0x402e000000000000
    frame #2: 0x000000011b32e68a SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of closure #1 () -> () in SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).didLayoutInContentView(SourceEditor.SourceEditorContentView) -> () + 1290
    frame #3: 0x000000011b328f02 SourceEditor`partial apply forwarder for closure #1 () -> () in SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).didLayoutInContentView(SourceEditor.SourceEditorContentView) -> () + 50
    frame #4: 0x000000011b2f9410 SourceEditor`reabstraction thunk helper from @callee_owned () -> () to @callee_unowned @convention(block) () -> () + 32
    frame #5: 0x000000011b2c90e7 SourceEditor`@objc static (extension in SourceEditor):__C.NSView.performWithoutAnimation(() -> ()) -> () + 23
    frame #6: 0x000000011b328e80 SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).didLayoutInContentView(SourceEditor.SourceEditorContentView) -> () + 208
    frame #7: 0x000000011b322d39 SourceEditor`protocol witness for SourceEditor.LayoutVisualization.didLayoutInContentView(SourceEditor.SourceEditorContentView) -> () in conformance SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D) : SourceEditor.LayoutVisualization in SourceEditor + 25
    frame #8: 0x000000011b51b9f2 SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed> of SourceEditor.SourceEditorLayoutManager.(didLayoutVisibleLinesInContentView in _8A34A44A3A81F5AC1210A0E6DECBF3AB)(SourceEditor.SourceEditorContentView) -> () + 626
    frame #9: 0x000000011b51c1ed SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed> of SourceEditor.SourceEditorLayoutManager.layoutContentView(SourceEditor.SourceEditorContentView) -> () + 861
    frame #10: 0x000000011b2f86c4 SourceEditor`@objc SourceEditor.SourceEditorContentView.layoutSublayers(of: __C.CALayer) -> () + 68
    frame #11: 0x00007fffaaf3850c QuartzCore`-[CALayer layoutSublayers] + 210
    frame #12: 0x00007fff9d29f418 AppKit`_NSBackingLayerLayoutSublayers + 157
    frame #13: 0x00007fffaaf2b22a QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 370
    frame #14: 0x00007fffaaf2b0a4 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 24
    frame #15: 0x00007fffaaf20a64 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 326
    frame #16: 0x00007fffaae1637e QuartzCore`CA::Transaction::commit() + 480
    frame #17: 0x00007fff9da3d445 AppKit`__65+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayRefresh]_block_invoke + 283
    frame #18: 0x00007fff9fb1da37 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    frame #19: 0x00007fff9fb1d98e CoreFoundation`__CFRunLoopDoObservers + 430
    frame #20: 0x00007fff9fb00308 CoreFoundation`__CFRunLoopRun + 984
    frame #21: 0x00007fff9faffcb9 CoreFoundation`CFRunLoopRunSpecific + 409
    frame #22: 0x00007fff9ee5cf0b HIToolbox`RunCurrentEventLoopInMode + 227
    frame #23: 0x00007fff9ee5cbb7 HIToolbox`ReceiveNextEventCommon + 366
    frame #24: 0x00007fff9ee5ca2c HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
    frame #25: 0x00007fff9d158e13 AppKit`_DPSNextEvent + 2085
    frame #26: 0x00007fff9d8df39e AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2930
    frame #27: 0x0000000100905a73 DVTKit`-[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
    frame #28: 0x00007fff9d14d99d AppKit`-[NSApplication run] + 764
    frame #29: 0x00007fff9d11cd7d AppKit`NSApplicationMain + 854
    frame #30: 0x00007fffc6aca515 libdyld.dylib`start + 1
    frame #31: 0x00007fffc6aca515 libdyld.dylib`start + 1

(lldb) register read

General Purpose Registers:
       rax = 0x0000079e00000002
       rbx = 0x000000012fb081a0
       rcx = 0x0000079a00000002
       rdx = 0x0000000200000002
       rdi = 0x0000000000000008
       rsi = 0x0000000000000005
       rbp = 0x00007fff5fbfc6b0
       rsp = 0x00007fff5fbfc230
        r8 = 0x0000000000000073
        r9 = 0x0000000100000000  Xcode`_mh_execute_header
       r10 = 0x0000000400000000
       r11 = 0x000000010ba1c110
       r12 = 0x0000000000000030
       r13 = 0x0000000000000118
       r14 = 0x000000012fb4e8a0
       r15 = 0x0000000102f5e048  _swiftEmptyArrayStorage
       rip = 0x000000011b32b6ae  SourceEditor`function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Owned To Guaranteed> of SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).layout(inlineContainerLozenge: SourceEditor.(StructuredSelectionVisualization in _7AFBC303C5A816C40636AEF2F174C33D).LozengeContext, in: SourceEditor.SourceEditorContentView) -> () + 7518
    rflags = 0x0000000000010293
        cs = 0x000000000000002b
        fs = 0x0000000000000000
        gs = 0x0000000000000000

Comments

Jean-David Gadina

Have you read the description?!?

As mentioned, Xcode crashes WITHOUT generating a crash report. Also, NO DIAGNOSTIC REPORT is available on my machine.

Sorry, but I’m afraid the LLDB trace is all I can attach here...

Apple Developer Relations

Please attach the crash log.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!