简体   繁体   English

在我升级Xcode6后尝试在iPhone模拟器中调试时,Xcode有时会崩溃

[英]Xcode sometimes crashes when I try to debug in iPhone Simulator after I upgrade Xcode6

I am developing an iPhone app and using iPhone Simulator most of the time. 我正在开发iPhone应用程序并且大部分时间都在使用iPhone模拟器。 When I try to debug one of my project in iPhone Simulator(does not matter what type and OS version) for debugging, Xcode sometimes suddenly crashes. 当我尝试在iPhone模拟器中调试我的一个项目(无论什么类型和操作系统版本)进行调试时,Xcode有时会突然崩溃。

After this error happens, changing code just one line and recompiling solves crash, but Xcode6 always crashes when I try to debug the project in iPhone Simulator if I don't recompile the project. 发生此错误后,更改代码只需一行并重新编译解决崩溃,但如果我不重新编译项目,当我尝试在iPhone模拟器中调试项目时Xcode6总是崩溃。 Then, after continuing programming for a while, same crash happens. 然后,在继续编程一段时间后,发生同样的崩溃。

I might found the reason of crash, which is difference of the signing date and last modification date, from an another topic, but I'm not sure how to approach solving it. 我可能会从另一个主题找到崩溃的原因,这是签名日期和最后修改日期的差异,但我不确定如何解决它。 (The person said because of Xcode5, but It had never happened when I was using Xcode5 on Mavericks though.) Compiling and linking C extension for Python in Xcode for Mac (这个人说是因为Xcode5,但是当我在Mavericks上使用Xcode5时从未发生过。) 在Xcode for Mac中编译和链接Python的C扩展

The workspace of the project has nested several static libraries projects, so I suspected that it's because of editing nested library code, but it was also happened when I editing only main program code. 项目的工作区嵌套了几个静态库项目,所以我怀疑这是因为编辑嵌套库代码,但是当我只编辑主程序代码时也发生了这种情况。

This crash is not always happen, so hard to solve what is wrong for me. 这种崩溃并不总是发生,所以很难解决我的错误。 The workspace of the project is kind of huge, so I would like to avoid creating new workspace if it is possible. 项目的工作空间有点大,所以如果可能的话,我想避免创建新的工作空间。 I really appreciate someone helps. 我非常感谢有人的帮助。

This is the crash report. 这是崩溃报告。

Crashed Thread:  25  Dispatch queue: DBGLLDBLauncher Serial Queue

Exception Type:  EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000001359eb000

kernel messages:
-2 sec              CODE SIGNING: cs_invalid_page(0x1359eb000): p=21345[Xcode] final status 0x1000200, denying page sending SIGKILL
-2 sec              CODE SIGNING: process 21345[Xcode]: rejecting invalid page at address 0x1359eb000 from offset 0x1f3e000 in file "**PATH_OF_EXECUTABLE_FILE**" (cs_mtime:1412141335.0 == mtime:1412141335.0) (signed:1 validated:1 tainted:1 wpmapped:0 slid:0)

VM Regions Near 0x1359eb000:
    MALLOC_LARGE           0000000131224000-0000000133aad000 [ 40.5M] rw-/rwx SM=PRV  
--> mapped file            0000000133aad000-0000000136336000 [ 40.5M] r--/rwx SM=COW  
    MALLOC_LARGE           0000000136336000-0000000137690000 [ 19.4M] rw-/rwx SM=PRV 

I started running into this problem recently. 我最近开始遇到这个问题。 Tried without success a range of things to fix it including reinstalling Xcode (as Apple's Crash Reporter dialog suggests), reset the Simulator, clean build, clean DerivedData folder, etc. Getting desperate, I actually studied the crash report. 尝试了一系列修复它的事情,包括重新安装Xcode(如Apple的Crash Reporter对话框建议),重置模拟器,清理构建,清理DerivedData文件夹等。变得绝望,我实际上研究了崩溃报告。

The clue to fixing it for me lay there: 为我修复它的线索在那里:

Thread 24 Crashed:: <DBGLLDBSessionThread (pid=7926)>
...
14  com.apple.dt.dbg.DebuggerLLDB   ... -[DBGLLDBSession _createBreakpointFromFileBreakpoint:] + 254
...

LLDB is trying to create a breakpoint at the time it crashes. LLDB正在尝试在崩溃时创建一个断点。 So, I deleted all my breakpoints in Xcode before re-running the project in the Simulator and now it works. 所以,在模拟器中重新运行项目之前,我删除了Xcode中的所有断点,现在它可以工作了。

(You didn't post enough of your crash report to see what happened in your case, so your mileage may vary.) (你没有发布足够的崩溃报告来查看你的案件发生了什么,所以你的里程可能会有所不同。)

I do these steps after every update of Xcode: 我每次更新Xcode后都会执行以下步骤:

  • Product --> (hold down Alt key) Clean Build Folder 产品 - >(按住Alt键)清洁构建文件夹
  • Product --> Clean 产品 - >清洁
  • Window --> Organizer --> Delete derived data 窗口 - >管理器 - >删除派生数据

Then rebuild the project 然后重建项目

Code signature issues are usually due to a corrupted or incomplete install. 代码签名问题通常是由于安装损坏或不完整。 It might be that Xcode.app is loading a plugin at the time of the crash, and it is failing code signature verification. 可能是Xcode.app在崩溃时正在加载一个插件,而且代码签名验证失败了。 The snippet of your log is not enough for me to dive into it more. 您的日志片段不足以让我更深入地了解它。 Please file a radar at http://bugreport.apple.com (and reference the number here if you don't mind). 请在http://bugreport.apple.com上提交雷达(如果你不介意的话,请参考这里的数字)。

Also, you might try deleting Xcode.app from your system and reinstalling if you're feeling up to it. 此外,您可以尝试从系统中删除Xcode.app并重新安装,如果您对此感到满意的话。

我得到了同样的错误,并通过适当地配置代码签名实体和配置文件来解决它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我调用“ .stop()”方法时,Swift / Xcode6 AVAudioPlayer崩溃 - Swift/Xcode6 AVAudioPlayer crashes when I call “.stop()” method 在Xcode6中,为什么[CMAltimeter isRelativeAltitudeAvailable]在带有iPhone6的模拟器中运行时返回FALSE? - In Xcode6, why does [CMAltimeter isRelativeAltitudeAvailable] returns FALSE when run in Simulator with iPhone6? Xcode6中的iPhone Simulator发送Mac的OS版本 - iPhone Simulator in Xcode6 sends OS version of my Mac XCode IPhone Simulator升级后不显示用户位置 - XCode IPhone Simulator doesnt show user location after upgrade 每当我尝试打开项目信息时,Xcode都会崩溃 - Xcode crashes every time when I try to open PROJECT info 当我尝试选择“路由:功能&gt;地图中的行人”时,Xcode崩溃 - Xcode crashes when i try to select Routing : pedestrians in Capabilities > Maps 如何在Xcode 6.3.1中为iPhone 4/5添加模拟器 - How to I add simulator for iphone 4/5 in Xcode 6.3.1 从iPhone删除应用程序时Xcode崩溃 - Xcode crashes when I delete app from iPhone 当我在 Xcode 中用 iPhone 调试应用程序时出现“看门狗已过期” - "Watchdog has expired" when I debug app with iPhone in Xcode 自从xcode5升级以来,iPhone模拟器无法正常工作 - iPhone simulator not working since xcode5 upgrade
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM