2011-12-12 47 views
2

我是新的Mac開發。我有Lion並安裝了Xcode 4.2。但是,每當我嘗試點擊任何.m文件時,我都會收到崩潰。我剛剛創建了一個新項目,只要選擇包含.h和.m文件的文件夾,它就會給我一個內部錯誤的崩潰。我卸載一次並完全重新安裝。仍然是同樣的問題。 我基本上是一個Windows開發人員(.NET)。我正在嘗試學習iOS應用程序開發。 這是從彈出的對話框中的錯誤:xcode 4.2不斷崩潰與內部錯誤

內部錯誤 Xcode遇到內部邏輯錯誤。選擇「繼續」繼續以不一致的狀態運行Xcode。選擇「崩潰」來停止Xcode並提交Crash Reporter的錯誤。選擇「崩潰」將導致所有未保存的數據丟失。

UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[__NSCFDictionary setObject:forKey:]: 

    attempt to insert nil value (key: SourceTree(Dev)) 
UserInfo: (null) 
Hints: None 
Backtrace: 
    0 0x00007fff9116926a __exceptionPreprocess (in CoreFoundation) 
    1 0x00007fff94a3dd5e objc_exception_throw (in libobjc.A.dylib) 
    2 0x00007fff911690ba +[NSException raise:format:arguments:] (in CoreFoundation) 
    3 0x00007fff91169044 +[NSException raise:format:] (in CoreFoundation) 
    4 0x00007fff9112629b -[__NSCFDictionary setObject:forKey:] (in CoreFoundation) 
    5 0x000000010930b5c8 -[Xcode3Group resolutionContextForStrategies:] (in DevToolsCore) 
    6 0x0000000105ee6785 -[IDEGroupIdentityAndType _resolutionContextForContentWithStrategies:] (in IDEKit) 
    7 0x0000000105ee6e24 -[IDEGroupIdentityAndType customResolutionStrategiesDisplayNamePopupItems] (in IDEKit) 
    8 0x00007fff897be434 _NSGetUsingKeyValueGetter (in Foundation) 
    9 0x00007fff897be3e9 -[NSObject(NSKeyValueCoding) valueForKey:] (in Foundation) 
10 0x00007fff897dde76 -[NSObject(NSKeyValueCoding) valueForKeyPath:] (in Foundation) 
11 0x0000000105e3a735 -[IDEInspectorTextEnumerationProperty rebuildMenuContent] (in IDEKit) 
12 0x000000010561e028 -[DVTDelayedValidator doValidation:] (in DVTKit) 
13 0x0000000105e3b14c -[IDEInspectorTextEnumerationProperty configureEnumeratedOptions] (in IDEKit) 
14 0x0000000105e3b69e -[IDEInspectorTextEnumerationProperty bindAndConfigure] (in IDEKit) 
15 0x0000000105e361c9 -[IDEInspectorProperty viewDidInstall] (in IDEKit) 
16 0x00007fff911602e1 -[NSObject performSelector:] (in CoreFoundation) 
17 0x00007fff91164722 -[NSArray makeObjectsPerformSelector:] (in CoreFoundation) 
18 0x0000000105eefe8d -[IDEInspectorPropertyContainingView propertiesDidInstall] (in IDEKit) 
19 0x0000000105eeffcf -[IDEInspectorPropertyContainingView viewDidMoveToWindow] (in IDEKit) 
20 0x00007fff8fdf1153 -[NSView _setWindow:] (in AppKit) 
21 0x00007fff8fd1d124 __NSViewRecursionHelper (in AppKit) 
22 0x00007fff910f7314 CFArrayApplyFunction (in CoreFoundation) 
23 0x00007fff8fdf10d7 -[NSView _setWindow:] (in AppKit) 
24 0x00007fff8fd1d124 __NSViewRecursionHelper (in AppKit) 
25 0x00007fff910f7314 CFArrayApplyFunction (in CoreFoundation) 
26 0x00007fff8fdf10d7 -[NSView _setWindow:] (in AppKit) 
27 0x00007fff8fd1d124 __NSViewRecursionHelper (in AppKit) 
28 0x00007fff910f7314 CFArrayApplyFunction (in CoreFoundation) 
29 0x00007fff8fdf10d7 -[NSView _setWindow:] (in AppKit) 
30 0x00007fff8fd1d124 __NSViewRecursionHelper (in AppKit) 
31 0x00007fff910f7314 CFArrayApplyFunction (in CoreFoundation) 
32 0x00007fff8fdf10d7 -[NSView _setWindow:] (in AppKit) 
33 0x00007fff8fd1d124 __NSViewRecursionHelper (in AppKit) 
34 0x00007fff910f7314 CFArrayApplyFunction (in CoreFoundation) 
35 0x00007fff8fdf10d7 -[NSView _setWindow:] (in AppKit) 
36 0x00007fff8fdef3e2 -[NSView addSubview:] (in AppKit) 
37 0x00000001088fe5b4 -[NSView(IBAppKitViewIntegration) ibSwizzledNSViewDebug_addSubview:] (in IDEInterfaceBuilderCocoaIntegration) 
38 0x000000010569667d -[DVTDisclosureView layoutTopDown] (in DVTKit) 
39 0x000000010560e1c3 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
40 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
41 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
42 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
43 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
44 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
45 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
46 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
47 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
48 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
49 0x000000010560e272 __84+[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:]_block_invoke_0 (in DVTKit) 
50 0x000000010560e037 +[DVTAutoLayoutView _recursivelyLayoutSubviewsOfView:populatingSetWithLaidOutViews:] (in DVTKit) 
51 0x000000010560dde1 -[DVTAutoLayoutView viewWillDraw] (in DVTKit) 
52 0x00007fff8fd1bc11 -[NSView viewWillDraw] (in AppKit) 
53 0x00007fff8fd1bc11 -[NSView viewWillDraw] (in AppKit) 
54 0x00007fff8fd1bc11 -[NSView viewWillDraw] (in AppKit) 
55 0x00007fff8fd1bc11 -[NSView viewWillDraw] (in AppKit) 
56 0x00007fff8fd1a952 -[NSView _sendViewWillDrawInRect:clipRootView:suppressRecursion:] (in AppKit) 
57 0x00007fff8fd196c1 -[NSView displayIfNeeded] (in AppKit) 
58 0x00007fff8fd1907d _handleWindowNeedsDisplayOrLayoutOrUpdateConstraints (in AppKit) 
59 0x00007fff91128f37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation) 
60 0x00007fff91128e96 __CFRunLoopDoObservers (in CoreFoundation) 
61 0x00007fff910fe159 __CFRunLoopRun (in CoreFoundation) 
62 0x00007fff910fdae6 CFRunLoopRunSpecific (in CoreFoundation) 
63 0x00007fff8d3753d3 RunCurrentEventLoopInMode (in HIToolbox) 
64 0x00007fff8d37c58f ReceiveNextEventCommon (in HIToolbox) 
65 0x00007fff8d37c4ca BlockUntilNextEventMatchingListInMode (in HIToolbox) 
66 0x00007fff8fcdd3f1 _DPSNextEvent (in AppKit) 
67 0x00007fff8fcdccf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit) 
68 0x00007fff8fcd962d -[NSApplication run] (in AppKit) 
69 0x00007fff8ff5880c NSApplicationMain (in AppKit) 
70 0x00000001053e7eec (in Xcode) 
+0

嘗試發佈此在蘋果的開發者論壇上也是如此。 http://devforums.apple.com – JoePasq

+0

@JoePasq,那是我嘗試做的第一件事。不幸的是,他們希望我先成爲付費會員。我想先學習在Mac上開發,然後我可能會掏出99美元成爲付費會員。所以現在SO是我的救世主 – sdk

+0

好的,我應該注意到這一點。除非您打算通過商店發佈應用程序,否則我不會支付100美元僅用於論壇訪問。 – JoePasq

回答

2

這絕對聽起來像Xcode中的錯誤,而不是你負責的任何東西。

你有沒有完全的Xcode 4.2?當前版本的Xcode是4.2.1,它可能(或不可能)包含此問題的修復。

如果您在使用4.2.1已經,或最新版本繼續出現此行爲,請讓蘋果知道通過提交錯誤報告給他們的問題跟蹤服務:

Link to Apple Radar

+0

克雷格,我從Appstore下載它。它是4.2.1,這是從Appstore提供的版本。研究一下,我能夠找到4.2並且現在正在下載它。我將卸載4.2.1並安裝4.2,看看是否有幫助。 – sdk

+0

我可以從個人經驗中證明4.2也是不穩定的。您應該可以在彈出的對話框中單擊「繼續」,只需注意可能會出現的奇怪行爲* MAY *。 (我個人沒有見過)隨着蘋果公司更多地處理這些bug,情況會有所改善,但除了等待修正錯誤之外,我們現在沒有太多的工作。 – SplinterReality

+0

@SplinterReality很好知道。現在我不必浪費我的時間安裝4.2,並將繼續4.2.1,我目前有。儘管這很煩人。我是否可以安裝任何其他xcode版本,如4.0或3.x,這些版本更加穩定,但仍然適用於Lion和最新的iOS,即iOS 5? – sdk