无法启动模拟应用程序:未知错误 [英] Failed to launch simulated application: Unknown error

查看:146
本文介绍了无法启动模拟应用程序:未知错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • OS X 10.5.7(正版Mac)

  • Xcode 3.1.3

  • iPhone SDK 3.0

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

When I try to execute my iPhone application in simulator, I get the dreaded error message:


Failed to launch simulated application: Unknown error.

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

My application has two targets, but this error occurs on both of them.

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

When error occurs, the simulated OS hangs — it displays black screen and no longer responds on any input. Simulator application itself does not hang — all menus are active.

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

All other applications I've tried running (mostly Apple samples) do work fine. Purging of caches, rebooting and howling on the Moon did not helped. Rebuilding project from scratch did not helped either. I guess I have to do it again in smaller steps.

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

Meanwhile, are there any other things to try than these below?


  • Xcode |空缓存......

  • 删除目录/Library/Caches/com.apple.DeveloperTools。###

  • 完全重建

  • 重新启动

  • 更改产品名称(无论如何它都不包含任何空格)

  • 创建新项目并从中手动配置scratch

  • Xcode | Empty Caches...
  • Delete directory /Library/Caches/com.apple.DeveloperTools.###
  • Full rebuild
  • Reboot
  • Change the product name (it did not contain any spaces anyway)
  • Create new project and configure it manually from scratch

来自system.log的报价:

A quote from the 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消息不再出现在日志中,但未知错误仍然存​​在。

Note that something called VoiceOverTouch is mentioned in the log. My application does not contain (to the best of my knowledge) anything related to accessibility (could be brought in by some dependency though). I've enabled accessibility on my Mac as suggested in error message, but it did not helped. I've enabled Accessibility Inspector in the iPhone simulator. VoiceOverTouch message no longer appears in logs, but the Unknown error persists.

新日志:


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 


推荐答案

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

Recreating project step-by-step showed that it was directory structure.

我的目录名为'resources',包含我的应用程序资源。该目录已按原样添加到捆绑包中(通过文件夹参考功能)。

I've had directory named 'resources' with resources for my application. That directory was added to the bundle as is (via Folder References feature).

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

When I renamed that directory to less common name, error went away.

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

So, never name any custom directories in the bundle 'resources'.

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

Guys from Xcode (or simulator) team could improve their error reporting. I've had to spend whole day debugging this issue. :-(

这篇关于无法启动模拟应用程序:未知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆