iOS app crashing every other launch, can't find error iOS app crashing every other launch, can't find error xcode xcode

iOS app crashing every other launch, can't find error


Seems to be a combination of OS X 10.8.4 and LLDB. As kenster says, switching to GDB makes the problem go away.

Edit:
It's caused by a race condition in the debug server (I hear).

Here's a fix if you want to keep using LLDB: Instead of clicking Run while the app is already running in the simulator, kill it in Xcode (⌘-.), say "I love Xcode" 5 times and Run it again (⌘-R). It won't crash, I tested it.


Fixed in Xcode 4.6.3.


I was having this issue as well. Take a look at this post. Xcode 4.6.2 app crashes on every second run

Basically change your debugger from LLDB to GDB. I can't believe this was due to LLDB being buggy.


Switching to GDB or rebooting device/host does not solve the issue in my environment.

However, modifying the Run target in the associated XCode scheme to no longer launch automatically but instead to "Wait for HelloWorld.app to launch" did.

Only drawback is that this implies to manually start the application on the device. The debugger will then get connected.