- Home /
What might make an iOS game crash out without any Xcode error messages?
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?
Running out of memory maybe? Any sign of a application did receive memory warning?
Nope; I mean there is literally absolutely nothing in the XCode window. The game just closes and Xcode acts like nothing happened. (Says 'Finished running..." Is there a setting to give more error messages?
XCode is a right pain - have you tried switching debuggers between lldb and gdb in case you get any extra stuff? You can turn on some extra logging but a lot of it only works on the simulator - that's all memory related stuff.
I would recommend doing what @whydoidoit suggested, there may be something in the new debugger that gdb is missing if that's what you're defaulting to...
Answer by tomka · May 25, 2012 at 07:23 AM
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
LLV$$anonymous$$ is the new one, GCC is the old one. It defaults to LLV$$anonymous$$. If using LLV$$anonymous$$ can cause crashes, that's a big bug both Apple and Unity need to know about...
I don't actually want to support armv6; isn't that just for very old iPhones that would get poor framerate and can't run iOS5 or display any of my shaders correctly?
Answer by shrishaster · May 08, 2014 at 12:43 PM
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.
Answer by Jespertheend2 · Apr 26, 2015 at 08:32 PM
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 :)