Normally if I run my game from XCode and it runs into an error and quits, it shows a bunch of assembly code and flags something, usually an EXC-BAD-ACCESS (ie NullReferenceException).
But now I’m having a problem where after a couple of minutes it just quits, after nothing obvious happened- and there is no debug error message showing up. What could be the reason for that?
I had this issue in Unity 3.4.x. The solution was make sure XCode was using the LLVM compiler (or was it the GCC compiler?.. there’s only two, try both).
Also worth double checking:
- it’s building for iOS and not iOS Simulator. Make sure this is set properly both in the Unity Player settings and in your XCode project
- Architectures are armv6 and armv7
Have you tried reading the registers?
First go to Exceptions tab and ‘Add Exception Breakpoint’ using the + at the bottom left corner.
Then when the app crashes click on “0 objc_exception_throw” under Thread 1
Finally in the console enter:
- register read
(you should get a list of registers)
- po $rax (normally the exception is in ‘rax’)
(you should see the exception output on the console)
Hope this helps.
I have been trying to fix this issue for the last 2 hours or so and I turned out I simply had a break point in Xcode. This might not be the case for you but if anyone stumbles upon this thread, check your breakpoints.
In Xcode click this arrow
then right click your breakpoint and delete it
Not sure if this will be helpful to anyone or if I was just being stupid, but save yourself 2 hours and check your breakpoints