IOS simulator crashes on startup (intermittently), no device crashes

My application crashes on the iPhone 6.1 Simulator. It works at startup, but not every time. In fact, I can't make him crash twice in a row. Sometimes it is every time I run, sometimes I run three times every time. The crash is SIGABRT and does not cause error messages. I set a breakpoint in all exceptions, but always breaks in UIApplicationMain (...) in main.m

The return line produces:

* thread #1: tid = 0x1c03, 0x91398a6a libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT frame #0: 0x91398a6a libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x95c31b2f libsystem_c.dylib`pthread_kill + 101 frame #2: 0x023e857b libsystem_sim_c.dylib`abort + 140 frame #3: 0x02d92b4e GraphicsServices`GSRegisterPurpleNamedPort + 348 frame #4: 0x02d9269f GraphicsServices`_GSEventInitialize + 123 frame #5: 0x02d92c1f GraphicsServices`GSEventInitialize + 36 frame #6: 0x00ee0d99 UIKit`UIApplicationMain + 600 frame #7: 0x0000277d MyApp`main(argc=1, argv=0xbffff388) + 141 at main.m:16 

The application does not seem to crash on the device, but it is very annoying and has just begun recently. I tried to dump the contents, restart Xcode, restart the computer - no luck. Any ideas how I could debug this?

+7
source share
3 answers

Yes, this happened to me and to beta 10.8.4. The only solution is to stop the application, wait a couple of seconds, and then rebuild on the simulator. The reason for this is because you press build / run as soon as the build is done.

* Update * Starting with Xcode 4.6.3, this problem has been fixed. If anyone has a problem, post it here.

+4
source

Try editing the circuit and switching the debugger from LLDB to GDB (or vice versa) and see if it helps.

+1
source

We had a very similar problem and I found that changing the deployment target from 6.0 to 5.0 fixed it for me. Obviously, only if your application runs on 5.0 will it work.

0
source