jjzjj

objective-c - xcode 4.2 因内部错误而不断崩溃

coder 2024-01-21 原文

我是 Mac 开发新手。我有 Lion 并安装了 Xcode 4.2。但是,每当我尝试单击任何 .m 文件时,我都会遇到崩溃。我刚刚创建了一个新项目,一旦我选择了包含 .h 和 .m 文件的文件夹,它就会让我崩溃并出现内部错误。我卸载了一次并完全重新安装了它。还是一样的问题。 我基本上是一名 Windows 开发人员 (.NET)。我正在尝试学习 iOS App 开发。 这是弹出的崩溃对话框中的错误:

内部错误 Xcode 遇到内部逻辑错误。选择“继续”以在不一致的状态下继续运行 Xcode。选择“Crash”以停止 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)

最佳答案

这听起来绝对像是 Xcode 中的错误,与您无关。

你有 Xcode 4.2 吗? Xcode 的当前版本是 4.2.1,它可能(也可能不)包含针对此问题的修复程序。

如果您已经在使用 4.2.1,或者最新版本继续出现此行为,请通过向 Apple 的问题跟踪服务提交错误报告来告知 Apple:

Link to Apple Radar

关于objective-c - xcode 4.2 因内部错误而不断崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8468652/

有关objective-c - xcode 4.2 因内部错误而不断崩溃的更多相关文章

  1. ruby - 为什么我可以在 Ruby 中使用 Object#send 访问私有(private)/ protected 方法? - 2

    类classAprivatedeffooputs:fooendpublicdefbarputs:barendprivatedefzimputs:zimendprotecteddefdibputs:dibendendA的实例a=A.new测试a.foorescueputs:faila.barrescueputs:faila.zimrescueputs:faila.dibrescueputs:faila.gazrescueputs:fail测试输出failbarfailfailfail.发送测试[:foo,:bar,:zim,:dib,:gaz].each{|m|a.send(m)resc

  2. ruby-on-rails - Rails 常用字符串(用于通知和错误信息等) - 2

    大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje

  3. ruby - 为什么 4.1%2 使用 Ruby 返回 0.0999999999999996?但是 4.2%2==0.2 - 2

    为什么4.1%2返回0.0999999999999996?但是4.2%2==0.2。 最佳答案 参见此处:WhatEveryProgrammerShouldKnowAboutFloating-PointArithmetic实数是无限的。计算机使用的位数有限(今天是32位、64位)。因此计算机进行的浮点运算不能代表所有的实数。0.1是这些数字之一。请注意,这不是与Ruby相关的问题,而是与所有编程语言相关的问题,因为它来自计算机表示实数的方式。 关于ruby-为什么4.1%2使用Ruby返

  4. ruby - 检查 "command"的输出应该包含 NilClass 的意外崩溃 - 2

    为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar

  5. ruby - 主要 :Object when running build from sublime 的未定义方法 `require_relative' - 2

    我已经从我的命令行中获得了一切,所以我可以运行rubymyfile并且它可以正常工作。但是当我尝试从sublime中运行它时,我得到了undefinedmethod`require_relative'formain:Object有人知道我的sublime设置中缺少什么吗?我正在使用OSX并安装了rvm。 最佳答案 或者,您可以只使用“require”,它应该可以正常工作。我认为“require_relative”仅适用于ruby​​1.9+ 关于ruby-主要:Objectwhenrun

  6. Ruby Readline 在向上箭头上使控制台崩溃 - 2

    当我在Rails控制台中按向上或向左箭头时,出现此错误:irb(main):001:0>/Users/me/.rvm/gems/ruby-2.0.0-p247/gems/rb-readline-0.4.2/lib/rbreadline.rb:4269:in`blockin_rl_dispatch_subseq':invalidbytesequenceinUTF-8(ArgumentError)我使用rvm来管理我的ruby​​安装。我正在使用=>ruby-2.0.0-p247[x86_64]我使用bundle来管理我的gem,并且我有rb-readline(0.4.2)(人们推荐的最少

  7. ruby-on-rails - 如果 Object::try 被发送到一个 nil 对象,为什么它会起作用? - 2

    如果您尝试在Ruby中的nil对象上调用方法,则会出现NoMethodError异常并显示消息:"undefinedmethod‘...’fornil:NilClass"然而,有一个tryRails中的方法,如果它被发送到一个nil对象,它只返回nil:require'rubygems'require'active_support/all'nil.try(:nonexisting_method)#noNoMethodErrorexceptionanymore那么try如何在内部工作以防止该异常? 最佳答案 像Ruby中的所有其他对象

  8. ruby - 如何在 Lion 上安装 Xcode 4.6,需要用 RVM 升级 ruby - 2

    我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121

  9. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  10. ruby-on-rails - 如何在 Rails View 上显示错误消息? - 2

    我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c

随机推荐