ios - 尝试在模拟器上运行时 xcode 崩溃

标签 ios xcode

自从我将我的 xcode 更新到版本 5.1.1 后,我在模拟器/设备上的构建/运行失败并出现了很长的问题报告。

这是错误报告的一小部分:

Process:         Xcode [569]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:         5.1.1 (5085)
Build Info:      IDEFrameworks-5085000000000000~10
App Item ID:     497799835
App External ID: 520942841
Code Type:       X86-64 (Native)
Parent Process:  launchd [171]
Responsible:     Xcode [569]
User ID:         501

Date/Time:       2014-05-20 17:53:11.050 +0200
OS Version:      Mac OS X 10.9 (13A497d)
Report Version:  11
Anonymous UUID:  A73022B3-59C3-407B-C950-F4C9E0B2F9B4


Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8bee87b640> from <IDERunPauseContinueToolbarButton: 0x7f8bee87b640>
ProductBuildVersion: 5B1008
UNCAUGHT EXCEPTION (NSInvalidArgumentException): must provide a file handle or pipe
UserInfo: (null)
Hints: 
  0: Sending performRunAction: to <IDERunPauseContinueToolbarButton: 0x7f8bee87b640> from <IDERunPauseContinueToolbarButton: 0x7f8bee87b640>
  1: Sending performAction: to <DVTDelayedMenuButtonCell: 0x7f8bee87bc50> from <IDERunPauseContinueToolbarButton: 0x7f8bee87b640>
Backtrace:
  0  0x00007fff93d07024 __exceptionPreprocess (in CoreFoundation)
  1  0x000000010d136b10 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2  0x00007fff93e6be15 objc_exception_throw (in libobjc.A.dylib)
  3  0x00007fff93d06e2c +[NSException raise:format:] (in CoreFoundation)
  4  0x00007fff92a285c5 NOCOPY_SETTER_IMPL (in Foundation)
  5  0x000000010fd8ba7d -[DVTDeveloperModeHelper isDeveloperModeEnabled] (in DVTDeveloperModeHelper)
  6  0x000000010fd8be72 -[DVTDeveloperModeAlertHelper shouldAskUserAboutDeveloperMode] (in DVTDeveloperModeHelper)
  7  0x000000010fd8bedc -[DVTDeveloperModeAlertHelper askToEnableDeveloperModeIfNecessaryWithCompletionHandler:] (in DVTDeveloperModeHelper)
  8  0x000000010e2c149d -[IDEWorkspaceTabController _performDebuggableSchemeTask:onScheme:runDestination:command:commandName:buildCommand:filePath:overridingTestingSpecifiers:invocationRecord:completionBlock:] (in IDEKit)
  9  0x000000010e2c20ed -[IDEWorkspaceTabController _runScheme:runDestination:invocationRecord:] (in IDEKit)
 10  0x000000010e1f4420 -[IDEWorkspaceTabController runActiveRunContext:] (in IDEKit)
 11  0x000000010e343c69 -[IDERunPauseContinueToolbarButton performRunAction:] (in IDEKit)
 12  0x00007fff8b62e7ba -[NSApplication sendAction:to:from:] (in AppKit)
 13  0x000000010d69af85 __37-[DVTApplication sendAction:to:from:]_block_invoke (in DVTKit)
 14  0x000000010d136842 DVTInvokeWithFailureHint (in DVTFoundation)
 15  0x000000010d568b0e -[DVTApplication sendAction:to:from:] (in DVTKit)
 16  0x000000010d6ebe09 -[DVTDelayedMenuButtonCell performAction:] (in DVTKit)
 17  0x00007fff8b62e7ba -[NSApplication sendAction:to:from:] (in AppKit)
 18  0x000000010d69af85 __37-[DVTApplication sendAction:to:from:]_block_invoke (in DVTKit)
 19  0x000000010d136842 DVTInvokeWithFailureHint (in DVTFoundation)
 20  0x000000010d568b0e -[DVTApplication sendAction:to:from:] (in DVTKit)
 21  0x000000010d633b0f -[DVTDelayedMenuButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in DVTKit)
 22  0x00007fff8b62bb96 -[NSControl mouseDown:] (in AppKit)
 23  0x000000010d64f9ef -[DVTMainStatusAwareButton mouseDown:] (in DVTKit)
 24  0x000000010d64f980 -[DVTRolloverTrackingButton mouseDown:] (in DVTKit)
 25  0x00007fff8b625261 -[NSWindow sendEvent:] (in AppKit)
 26  0x00007fff8b61f888 -[NSApplication sendEvent:] (in AppKit)
 27  0x000000010e0ed600 -[IDEApplication sendEvent:] (in IDEKit)
 28  0x00007fff8b540949 -[NSApplication run] (in AppKit)
 29  0x00007fff8b4ea9e3 NSApplicationMain (in AppKit)
 30  0x00007fff92c9560d start (in libdyld.dylib)
 31  0x0000000000000001

有人知道如何解决这个错误吗?它与代码有关吗?或者它只是对 xcode 5 的升级? 谢谢!

最佳答案

重置模拟器(菜单项 iOS Simulator -> Reset Content and Settings ...)。

转到 XCode 产品菜单,按住 Alt 键并单击 Clean Build Folder

转到 XCode Organizer Projects 选项卡并删除项目的派生数据。

最后关闭并重启 Xcode 和模拟器。

如果这不起作用,请尝试删除应用程序支持库中的模拟器数据 - 文件夹 ~/Library/Application Support/iPhone Simulator

XCode 可以通过多种方式使自己进入不一致状态。在大多数情况下,上述过程应该可以解决。

关于ios - 尝试在模拟器上运行时 xcode 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23764817/

相关文章:

ios - SwiftUI 导航链接后退按钮在预览中有效,但在模拟器或设备中无效

c++ - 除了在类中和程序之前,是否还需要在其他任何地方声明函数?

iphone - Objective-C 方法评论

ios - Xcode 6 与 iOS 9?

ios - 创建一个选择器 View 以在多个 ViewController 上使用

iphone - 通过检测 URL scheme 替换本地资源

objective-c - 我可以像java c#那样在objective-c中实现真正的单例吗?

ios - Swift 显示警报最佳实践

ios - Swift MGSwipeTableCell 滑动删除单元格

c++ - 仅当 .h 位于特定目录中时,g++ 才会神秘地失败