无法启动模拟应用程序:未知错误

Ale*_*ysh 15 iphone xcode ios-simulator

  • OS X 10.5.7(原装Mac)
  • Xcode 3.1.3
  • iPhone SDK 3.0

当我尝试在模拟器中执行我的iPhone应用程序时,我收到了可怕的错误消息:

Failed to launch simulated application: Unknown error.

我的应用程序有两个目标,但这两个目标都会出现此错误.

发生错误时,模拟的操作系统会挂起 - 它会显示黑屏,不再响应任何输入.模拟器应用程序本身不会挂起 - 所有菜单都处于活动状态.

我尝试过的所有其他应用程序(主要是Apple样本)都可以正常运行.清除缓存,重新启动和在月球上嚎叫没有帮助.从头开始重建项目也没有帮助.我想我必须以较小的步骤再做一次.

同时,还有其他什么可以尝试下面这些?

  • Xcode | 空缓存......
  • 删除目录/Library/Caches/com.apple.DeveloperTools.###
  • 完全重建
  • 重启
  • 更改产品名称(它不包含任何空格)
  • 创建新项目并从头开始手动配置

来自system.log的引用:

12.08.09 0:13:59 [0x0-0xa70a7].com.apple.iphonesimulator[5368] -[MonitorController forwardEvents]: unable to send msg to ffffffff: 10000003 
12.08.09 0:13:59 [0x0-0xa70a7].com.apple.iphonesimulator[5368] -[MonitorController forwardEvents]: unable to send msg to ffffffff: 10000003 
12.08.09 0:14:03 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.dataaccess.dataaccessd) Unknown key for integer: JetsamPriority 
12.08.09 0:14:03 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.apsd) Path monitoring failed on "/var/mobile/Library/Preferences": No such file or directory 
12.08.09 0:14:03 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.dataaccess.dataaccessd) Path monitoring failed on "/var/mobile/Library/Preferences": No such file or directory 
12.08.09 0:14:03 vot[9750] ******** AX INSPECTOR MODE ************ 
12.08.09 0:14:03 vot[9750] VoiceOverTouch exiting because accessibility is not enabled. To enable do this: 'defaults write com.apple.Accessibility AccessibilityEnabled true' 
12.08.09 0:14:03 Xcode[9079] Error launching simulated application: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x39251e0 "Unknown error."

请注意,VoiceOverTouch日志中提到了调用的内容.我的应用程序不包含(据我所知)与可访问性相关的任何事情(虽然可能由某些依赖项引入).我已按照错误消息中的建议在我的Mac上启用了辅助功能,但它没有帮助.我在iPhone模拟器中启用了Accessibility Inspector.VoiceOverTouch消息不再出现在日志中,但"未知"错误仍然存​​在.

新日志:

12.08.09 11:01:20 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.AXInspector[10808]) Exited: Terminated 
12.08.09 11:01:28 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.dataaccess.dataaccessd) Unknown key for integer: JetsamPriority 
12.08.09 11:01:28 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.apsd) Path monitoring failed on "/var/mobile/Library/Preferences": No such file or directory 
12.08.09 11:01:28 com.apple.launchd[166] (com.apple.iPhoneSimulator:com.apple.dataaccess.dataaccessd) Path monitoring failed on "/var/mobile/Library/Preferences": No such file or directory 
12.08.09 11:01:28 vot[10812] ******** AX INSPECTOR MODE ************ 
12.08.09 11:01:28 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x2e9b930, has non-zero refcount = 1 
12.08.09 11:01:28 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x495e240, has non-zero refcount = 1 
12.08.09 11:01:28 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x2e9b930, has non-zero refcount = 1 
12.08.09 11:01:28 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x495e240, has non-zero refcount = 1 
12.08.09 11:01:28 Xcode[10200] Error launching simulated application: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x49b0060 "Unknown error." 
12.08.09 11:01:29 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x44e4ba0, has non-zero refcount = 1 
12.08.09 11:01:29 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x4537820, has non-zero refcount = 1 
12.08.09 11:01:29 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x44e4ba0, has non-zero refcount = 1 
12.08.09 11:01:29 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x4537820, has non-zero refcount = 1 
12.08.09 11:01:29 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x4775400, has non-zero refcount = 1 
12.08.09 11:01:29 Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x478fa20, has non-zero refcount = 1 
12.08.09 11:01:29 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x4775400, has non-zero refcount = 1 
12.08.09 11:01:29 [0x0-0xbf0bf].com.apple.Xcode[10200] Xcode(10200,0xb0103000) malloc: free_garbage: garbage ptr = 0x478fa20, has non-zero refcount = 1 

Ale*_*ysh 28

逐步重新创建项目表明它是目录结构.

我的目录以'resources'我的应用程序的资源命名.该目录已按原样添加到包中(通过Folder References功能).

当我将该目录重命名为不常见的名称时,错误就消失了.

因此,永远不要在包中命名任何自定义目录'resources'.

来自Xcode(或模拟器)团队的人可以改进他们的错误报告.我不得不花一整天时间调试这个问题.:-(

  • 非常不幸的是,模拟器有一个"未知"的错误代码.我觉得好像有很多不同的东西可以导致这个错误,我只是有一个案例,它是由'可执行'命名不同于'目标' (5认同)