We’re seeing a high number of crashes in our latest releases of one of our games. It seems to only be affecting iPhones so far, no iPads yet (which is the platform mostly used for our game), and so far we’re only seeing crashes on iOS 10 no other versions, see the attached screen dump over devices and iOS versions. I’ve also attached the full log from crashlytics.
The crash seems to happen at UnityRepaint (UnityAppController+Rendering.mm:249), and it causes a Fatal Exception: NSInternalInconsistencyException
Anyone else seeing these issues? Any workarounds? Is this a known issue at Unity @christophergoy ?
2894819–212917–crashlog-crashlytics.txt (41 KB)
1 Like
Hi @hsallander ,
This crash looks eerily familiar to me, though I haven’t seen it in a while. Could you file a bug so QA can get a chance to look at it. I think I recently saw a similar one in another thread.
Cheers,
Chris
1 Like
Hi @christophergoy ,
I’ve filed a bug to the QA team now, and I’ve searched the forums but can’t find any older posts that seem related, but at least one post that seems to be the exact same issue but posted after mine so more people are having this issue for sure.
Looking at the stack trace again I see that there’s a line: “UnityAppController applicationWillResignActive” just before the UnityRepaint that cause the crash, and seeing that the bug only happens on phones and not tablets maybe it’s related to this bug regarding portrait/landscape mode when app is going into the background? If so that would be a bit of a relief under the circumstances, knowing it only happens when the app is being closed/sent to the background.
Edit: after an email conversation with the QA team at Unity it seems likely that the bug is indeed the one mentioned above and also reported here, regarding locking the phone and then resuming the app in a different rotation than when it was being locked. @christophergoy it would still be interesting to hear if you have any information as to when that bug might be fixed with a patch, thanks!
1 Like
Hey @hsallander ,
I’m on vacation at the moment and do not have access to my computer, yet I think I know of a workaround. There is a method in UnityAppController that tries to create a snapshot of frame is currently being rendered on the device. If you comment out the code that is in any way related to taking a snapshot, it might stop the crashes. It should be easy to reproduce the crash with the examples you’ve stated. Please try to reproduce it, then comment out the snapshot code and let me know how it turns out.
Cheers,
Chris
3 Likes
I’ve been seeing an NSInternalInconsistencyException too, which might be the same thing? In my case it’s very repeatable when resuming from suspend if the device has been locked - I posted about it here:
https://forum.unity3d.com/threads/ios-10-0-and-xcode-8-compatibility.430103/page-4#post-2899069
Have only been able to test on 2 devices though, an iPhone 6S with iOS10.2 (repeatable crash), and an iPod Touch 5G with iOS 9.2 (no crash). Happens with both GLES2 and Metal. Have tried 2 XCode versions and 3 (very recent) Unity releases
Edit: Commenting out the [self repaint]; in applicationWillResignActive() in UnityAppController.mm seems to stop the crashing on resume.
Looks like it’s a known issue:
Changing ENABLE_RUNLOOP_ACCEPT_INPUT to 0 seems to help to avoid this crash.
But it may cause some issue with responsiveness to user inputs? Right?
1 Like
hello @amjallks!
i want to know is responsiveness of inputs got effected by the change or not?
because this crash really freak me out.
thanks.
We didn’t receive any reports from our players about input issues.
But I can confirm, this issue is fixed in 5.5.2p2.