I am developing an iPhone app and using iPhone Simulator most of the time. 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.
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. 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
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.
The clue to fixing it for me lay there:
LLDB is trying to create a breakpoint at the time it crashes. So, I deleted all my breakpoints in Xcode before re-running the project in the Simulator and now it works.
(You didn't post enough of your crash report to see what happened in your case, so your mileage may vary.)
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. 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).
Also, you might try deleting Xcode.app from your system and reinstalling if you're feeling up to it.
I do these steps after every update of Xcode:
Then rebuild the project
I got this same error, and resolved it by configuring Code Signing Entity and Provisioning Profile appropriately.