Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Crashes with Assertion Failure in SourceCache

I am getting following error when I try to edit any file in my project.

ASSERTION FAILURE in /SourceCache/IDEFoundation/IDEFoundation-943/Framework/Classes/Model/SourceControl/IDESourceControlTreeItem.m:771
Details:  (((IDESourceControlWorkingTree *)self.sourceTree).origin) should not be nil.
Object:   <IDESourceControlWorkingTreeItem: 0x401a17c00>
Method:   -repositoryURLString
Thread:   <NSThread: 0x40010a260>{name = (null), num = 1}
Hints:   None
Backtrace:
0  0x00000001012fe366 -[IDEAssertionHandler  handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1  0x00000001009751a4 _DVTAssertionFailureHandler (in DVTFoundation)
2  0x0000000100f4b455 -[IDESourceControlWorkingTreeItem repositoryURLString] (in IDEFoundation)
3  0x00007fff87b27434 _NSGetUsingKeyValueGetter (in Foundation)
4  0x00007fff87b273e9 -[NSObject(NSKeyValueCoding) valueForKey:] (in Foundation)
5  0x00007fff87b46e76 -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation)
6  0x00007fff909a63f1 -[NSArrayController _multipleValueForKeyPath:atIndex:] (in AppKit)
7  0x00007fff909a54e5 -[NSArrayController _singleValueForKeyPath:] (in AppKit)
8  0x00007fff9070c09a -[_NSControllerObjectProxy valueForKeyPath:] (in AppKit)
9  0x00007fff87b46e39 -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation)
10  0x00007fff87b46e39 -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation)
11  0x00007fff9070bf46 -[NSBinder _valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] (in AppKit)
12  0x00007fff9070bc30 -[NSBinder valueForBinding:resolveMarkersToPlaceholders:] (in AppKit)
13  0x00007fff9090fc92 -[NSValueBinder _referenceBindingValue] (in AppKit)
14  0x00007fff9090faa3 -[NSValueBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] (in AppKit)
15  0x00007fff9090f788 -[NSValueBinder _observeValueForKeyPath:ofObject:context:] (in AppKit)
16  0x00007fff909275af -[NSTextValueBinder _observeValueForKeyPath:ofObject:context:] (in AppKit)
17  0x00007fff906fdbdb -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] (in AppKit)
18  0x0000000100b38c0d -[NSObject(DVTBindingUtilities) dvt_bind:toObject:withKeyPath:options:] (in DVTKit)
19  0x0000000101358251 -[IDEInspectorBasicStringProperty bindAndConfigure] (in IDEKit)
20  0x00000001013ff200 -[IDEInspectorPathFieldProperty bindAndConfigure] (in IDEKit)
21  0x000000010134e1c9 -[IDEInspectorProperty viewDidInstall] (in IDEKit)
22  0x00007fff8b3ee2e1 -[NSObject performSelector:] (in CoreFoundation)
23  0x00007fff8b3f2722 -[NSArray makeObjectsPerformSelector:] (in CoreFoundation)
24  0x0000000101407e8d -[IDEInspectorPropertyContainingView propertiesDidInstall] (in IDEKit)
25  0x0000000101407fcf -[IDEInspectorPropertyContainingView viewDidMoveToWindow] (in IDEKit)
26  0x00007fff907f9153 -[NSView _setWindow:] (in AppKit)
27  0x00007fff90725124 __NSViewRecursionHelper (in AppKit)
28  0x00007fff8b385314 CFArrayApplyFunction (in CoreFoundation)
29  0x00007fff907f90d7 -[NSView _setWindow:] (in AppKit)
30  0x00007fff90725124 __NSViewRecursionHelper (in AppKit)
31  0x00007fff8b385314 CFArrayApplyFunction (in CoreFoundation)
32  0x00007fff907f90d7 -[NSView _setWindow:] (in AppKit)
33  0x00007fff90725124 __NSViewRecursionHelper (in AppKit)
34  0x00007fff8b385314 CFArrayApplyFunction (in CoreFoundation)
35  0x00007fff907f90d7 -[NSView _setWindow:] (in AppKit)
36  0x00007fff90725124 __NSViewRecursionHelper (in AppKit)
37  0x00007fff8b385314 CFArrayApplyFunction (in CoreFoundation)
38  0x00007fff907f90d7 -[NSView _setWindow:] (in AppKit)
39  0x00007fff90725124 __NSViewRecursionHelper (in AppKit)
40  0x00007fff8b385314 CFArrayApplyFunction (in CoreFoundation)
41  0x00007fff907f90d7 -[NSView _setWindow:] (in AppKit)
42  0x00007fff907f73e2 -[NSView addSubview:] (in AppKit)
43  0x00000001046785b4 -[NSView(IBAppKitViewIntegration) ibSwizzledNSViewDebug_addSubview:] (in IDEInterfaceBuilderCocoaIntegration)
44  0x0000000100bb167d -[DVTDisclosureView layoutTopDown] (in DVTKit)
45  0x0000000100b291c3 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
46  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
47  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
48  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
49  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
50  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
51  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
52  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
53  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
54  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
55  0x0000000100b29272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit)
56  0x0000000100b29037 +[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:] (in DVTKit)
57  0x0000000100b28de1 -[DVTAutoLayoutView viewWillDraw] (in DVTKit)
58  0x00007fff90723c11 -[NSView viewWillDraw] (in AppKit)
59  0x00007fff90723c11 -[NSView viewWillDraw] (in AppKit)
60  0x00007fff90723c11 -[NSView viewWillDraw] (in AppKit)
61  0x00007fff90723c11 -[NSView viewWillDraw] (in AppKit)
62  0x00007fff90722952 -[NSView _sendViewWillDrawInRect:clipRootView:suppressRecursion:] (in AppKit)
63  0x00007fff907216c1 -[NSView displayIfNeeded] (in AppKit)
64  0x00007fff9072107d _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints (in AppKit)
65  0x00007fff8b3b6f37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
66  0x00007fff8b3b6e96 __CFRunLoopDoObservers (in CoreFoundation)
67  0x00007fff8b38c159 __CFRunLoopRun (in CoreFoundation)
68  0x00007fff8b38bae6 CFRunLoopRunSpecific (in CoreFoundation)
69  0x00007fff8f1dd3d3 RunCurrentEventLoopInMode (in HIToolbox)
70  0x00007fff8f1e463d ReceiveNextEventCommon (in HIToolbox)
71  0x00007fff8f1e44ca BlockUntilNextEventMatchingListInMode (in HIToolbox)
72  0x00007fff906e53f1 _DPSNextEvent (in AppKit)
73  0x00007fff906e4cf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
74  0x00007fff906e162d -[NSApplication run] (in AppKit)
75  0x00007fff9096080c NSApplicationMain (in AppKit)
76  0x0000000100904eec (in Xcode)

I tried clearing XCode cache as mentioned in this question, but that didn't work. I tried reinstalling xcode but that also failed.

I am using Xcode Version 4.2.1 on MAC OSX Version 10.7.2 (Lion).

Let me know if you have any suggestions regarding the same.

Thanks.

like image 631
Tushar Vengurlekar Avatar asked Nov 04 '22 08:11

Tushar Vengurlekar


1 Answers

This is solved now. This was due to missing repository in XCode. I had to go to Organizer -> Repositories and press + button in bottom left corner to add repository. After which my project is compiling very well. Thanks Horst for your effort though.

like image 60
Tushar Vengurlekar Avatar answered Nov 10 '22 20:11

Tushar Vengurlekar