Hey, we are using Crashlytics to track crashes and we are getting a good few crashes with the below crash log:
Any ideas as to the cause of this crash?
These are happening on iPhone 6, iPhone 5s and iPad Air 2. My initial thoughts are this is a memory issue, as the devices have about 5% free ram when the crash happens, with one exception been a device has 26% free ram but only 2% space on the device (although we don’t download any additional assets during the game). Although, we have never been able to get our test iPad Air 2 to crash due to memory issue.
Actually, this call stack does not provide much information about the cause of the crash. When you run with the Script Call Optimization setting with a value of “Fast but no exceptions”, Unity will install a managed event handler for the AppDomain.UnhandledException event. If a managed code exception escapes from your script code (e.g. out of an Update or Awake method), the UnhandledException event is fired. The Unity event handler logs the managed exception using the Unity CrashReport API, then it calls abort in the CrashedCheckBellowForHintsWhy function to terminate the app.
So the call stack you are seeing here is the result of that behavior. To better understand the actual cause of the managed exception, you can attach a custom event handler to the UnhandledException event, and obtain the managed call stack. I believe that some crash reporting services to exactly this. I’m not sure about Crashlytics though.
Thanks for the explanation of what is happening, I’ll have a look into this, I believe Crashlytics has the ability to do this, I’ll investigate more, thanks!
As Josh mentioned, the call stack isn’t useful for locating the problem. We just switched from “Fast but no exceptions” to “Slow but safe” (I think that’s the name) and then our call stacks provided much more useful information to the cause of the crash.