Xcode 因 SourceCache 中的断言失败而崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8708231/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Crashes with Assertion Failure in SourceCache
提问by Tushar Vengurlekar
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 thisquestion, but that didn't work. I tried reinstalling xcode but that also failed.
我尝试清除此问题中提到的 XCode 缓存,但这没有用。我尝试重新安装 xcode,但也失败了。
I am using Xcode Version 4.2.1 on MAC OSX Version 10.7.2 (Lion).
我在 MAC OSX 版本 10.7.2 (Lion) 上使用 Xcode 版本 4.2.1。
Let me know if you have any suggestions regarding the same.
如果您对此有任何建议,请告诉我。
Thanks.
谢谢。
采纳答案by Tushar Vengurlekar
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.
现在已经解决了。这是由于 XCode 中缺少存储库。我必须去 Organizer -> Repositories 然后按左下角的 + 按钮来添加存储库。之后我的项目编译得很好。不过感谢霍斯特的努力。
回答by Horst
Read-only source/plist/project files had been the root cause for the same problem with my Xcode. You may just verify that all files in your project folder are writable.
只读源/plist/项目文件是我的 Xcode 出现同样问题的根本原因。您可以验证项目文件夹中的所有文件是否可写。