Sometimes Xcode crashes when trying to debug in iPhone Simulator after updating Xcode6

I am developing an application for the iPhone and use the iPhone Simulator most of the time. When I try to debug one of my projects in iPhone Simulator (no matter what type and version of the OS) for debugging, Xcode sometimes crashes unexpectedly.

After this error has occurred, changing only one line of code and recompiling solves the crash problem, but Xcode6 always crashes when I try to debug a project in iPhone Simulator if I do not recompile the project. Then, continuing programming for a while, the same failure occurs.

I could find a reason for the collapse, which differs from the date of signing and the last modification date, from a different topic, but I'm not sure how to approach its solution. (The man said because of Xcode5, but it never happened when I used Xcode5 on Mavericks.) Compiling and linking the C extension for Python in Xcode for Mac

The workspace of the project has nested several projects of static libraries, so I suspected that this was due to editing the embedded code of the library, but this also happened when I edited only the main program code.

This crash doesn't always happen, so it's hard to decide what is wrong for me. The project workspace is very large, so I would like to avoid creating a new workspace, if possible. I really appreciate someone helping.

This is a 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 
+5
source share
4 answers

Recently, I began to face this problem. I tried without success a number of things to fix it, including reinstalling Xcode (as suggested by the Apple Crash Reporter dialog), reset Simulator, clean build, clean DerivedData folder, etc. Desperate, I really studied the crash report.

The key to fixing it for me lies 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 of the failure. So, I deleted all my breakpoints in Xcode before restarting the project in Simulator and now it works.

(You have not published enough of your crash report to find out what happened in your case, so your mileage may vary.)

+5
source

I do these steps after every Xcode update:

  • Product → (hold Alt) Clear build folder
  • Product → Cleaning
  • Window → Organizer → Delete Derived Data

Then rebuild the project

+1
source

Code signing issues are usually related to a damaged or incomplete installation. Perhaps Xcode.app loads the plugin during the crash and it does not perform code signature verification. A fragment of your journal is not enough for me to dive into it more. Please submit the radar to http://bugreport.apple.com (and enter the number here if you do not mind).

Alternatively, you can try uninstalling Xcode.app from your system and reinstalling if you feel it.

0
source

I got the same error and resolved it by setting up the Signing Entity and Provisioning Profile accordingly.

0
source

Source: https://habr.com/ru/post/1203766/


All Articles