iOS NSInternalInconsistencyException crash in UnityAppController+Rendering.mm line 248

Crash #2

My game is live, and a small % of players are experiencing crashes. I cannot reproduce any of them, so all I have to go on are traces reported via Crashlytics. This is one is one of the most frequent crashes players have. Any help is deeply appreciated!

Only happens on iOS
Crashes with NSInternalInconsistencyException
Crashes in: UnityAppController+Rendering.mm line 248
Built with IL2CPP

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x190c4d1b8 __exceptionPreprocess
1  libobjc.A.dylib                0x18f68455c objc_exception_throw
2  CoreFoundation                 0x190c4d08c +[NSException raise:format:]
3  Foundation                     0x191705098 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
4  UIKit                          0x196d85a88 _prepareForCAFlush
5  UIKit                          0x196da6250 _beforeCACommitHandler
6  CoreFoundation                 0x190bfa0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
7  CoreFoundation                 0x190bf7cf0 __CFRunLoopDoObservers
8  CoreFoundation                 0x190b262d8 CFRunLoopRunSpecific
9  matchdragons                   0x10001407c UnityRepaint (UnityAppController+Rendering.mm:248)
10 matchdragons                   0x100021334 -[UnityAppController applicationWillResignActive:] (UnityAppController.mm:309)
11 UIKit                          0x196b6a43c -[UIApplication _deactivateForReason:notify:]
12 UIKit                          0x196d88398 __61-[UIApplication _sceneSettingsPreLifecycleEventDiffInspector]_block_invoke
13 FrontBoardServices             0x19280c620 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke.27
14 Foundation                     0x191717024 __NSIndexSetEnumerate
15 BaseBoard                      0x192786f68 -[BSSettingsDiff inspectChangesWithBlock:]
16 FrontBoardServices             0x1928067b8 -[FBSSettingsDiff inspectOtherChangesWithBlock:]
17 FrontBoardServices             0x19280c3fc -[FBSSettingsDiffInspector inspectDiff:withContext:]
18 UIKit                          0x196d89800 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke
19 UIKit                          0x196d894a4 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]
20 UIKit                          0x1970b553c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
21 FrontBoardServices             0x1927f5dd4 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376
22 FrontBoardServices             0x19282392c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
23 FrontBoardServices             0x192823798 -[FBSSerialQueue _performNext]
24 FrontBoardServices             0x1927fc058 -[FBSWorkspace synchronizeSystemAnimationFencesWithCleanUpBlock:]
25 UIKit                          0x196d85684 -[UIApplication _synchronizeSystemAnimationFencesWithSpinCleanUpBlock:]
26 UIKit                          0x196dda664 __realPreCommitHandler_block_invoke
27 QuartzCore                     0x193f47e10 CA::Transaction::Fence::run_callbacks() const
28 QuartzCore                     0x193f1f4c4 CA::Context::commit_transaction(CA::Transaction*)
29 QuartzCore                     0x193f46a68 CA::Transaction::commit()
30 QuartzCore                     0x193f47488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
31 CoreFoundation                 0x190bfa0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
32 CoreFoundation                 0x190bf7cf0 __CFRunLoopDoObservers
33 CoreFoundation                 0x190b262d8 CFRunLoopRunSpecific
34 matchdragons                   0x10001407c UnityRepaint (UnityAppController+Rendering.mm:248)
35 matchdragons                   0x100013df0 -[UnityAppController(Rendering) repaintDisplayLink] (UnityAppController+Rendering.mm:54)
36 QuartzCore                     0x193ea2f24 CA::smile:isplay::smile:isplayLinkItem::dispatch(unsigned long long)
37 QuartzCore                     0x193ea2dd0 CA::smile:isplay::smile:isplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long)
38 IOKit                          0x190eba094 IODispatchCalloutFromCFMessage
39 CoreFoundation                 0x190be2e50 __CFMachPortPerform
40 CoreFoundation                 0x190bfb218 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
41 CoreFoundation                 0x190bfa9cc __CFRunLoopDoSource1
42 CoreFoundation                 0x190bf84b0 __CFRunLoopRun
43 CoreFoundation                 0x190b262b8 CFRunLoopRunSpecific
44 GraphicsServices               0x1925da198 GSEventRunModal
45 UIKit                          0x196b6d7fc -[UIApplication _run]
46 UIKit                          0x196b68534 UIApplicationMain
47 matchdragons                   0x10000e07c main (main.mm:32)
48 libdispatch.dylib              0x18fb095b8 (Missing)

Hi,

Seems to be the same issue as I posted last week as well, Multiple crashes in UnityAppController+Rendering.mm line 249, built with Unity 5.4.3p2 - p4 - Unity Engine - Unity Discussions

Edit: after some discussions with the QA team it seems the bug is the one reported here, Unity Issue Tracker - [iOS] Changing the screen orientation via a script sometimes results in corrupted view on iOS 10 . So @Peacewise you might want to check and see if that’s the case for the bug reports you’re getting too.

@Peacewise Did you get a response for that problem? I am seeing the same issue happening in our live build right now. We are on Unity 5.4.4p2.

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Filtered syslog:
None found

Last Exception Backtrace:
0   CoreFoundation                    0x189c611b8 __exceptionPreprocess + 124
1   libobjc.A.dylib                   0x18869855c objc_exception_throw + 56
2   CoreFoundation                    0x189c6108c +[NSException raise:format:arguments:] + 104
3   Foundation                        0x18a719098 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 88
4   UIKit                             0x18fd99a88 _prepareForCAFlush + 500
5   UIKit                             0x18fdba250 _beforeCACommitHandler + 24
6   CoreFoundation                    0x189c0e0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
7   CoreFoundation                    0x189c0bcf0 __CFRunLoopDoObservers + 372
8   CoreFoundation                    0x189b3a2d8 CFRunLoopRunSpecific + 476
9   possum                            0x1000ffaac UnityRepaint (UnityAppController+Rendering.mm:249)
10  possum                            0x1000ff8c0 -[UnityAppController(Rendering) repaint] (UnityAppController+Rendering.mm:60)
11  possum                            0x1001186e4 -[UnityAppController applicationWillResignActive:] (UnityAppController.mm:336)
12  UIKit                             0x18fb7e43c -[UIApplication _deactivateForReason:notify:] + 756
13  UIKit                             0x18fd9c398 __61-[UIApplication _sceneSettingsPreLifecycleEventDiffInspector]_block_invoke + 124
14  FrontBoardServices                0x18b820620 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke.27 + 208
15  Foundation                        0x18a72b024 __NSIndexSetEnumerate + 724
16  BaseBoard                         0x18b79af68 -[BSSettingsDiff inspectChangesWithBlock:] + 104
17  FrontBoardServices                0x18b81a7b8 -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 88
18  FrontBoardServices                0x18b8203fc -[FBSSettingsDiffInspector inspectDiff:withContext:] + 280
19  UIKit                             0x18fd9d800 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 120
20  UIKit                             0x18fd9d4a4 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 888
21  UIKit                             0x1900c953c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
22  FrontBoardServices                0x18b809dd4 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 208
23  FrontBoardServices                0x18b83792c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
24  FrontBoardServices                0x18b837798 -[FBSSerialQueue _performNext] + 176
25  FrontBoardServices                0x18b810058 -[FBSWorkspace synchronizeSystemAnimationFencesWithCleanUpBlock:] + 1404
26  UIKit                             0x18fd99684 -[UIApplication _synchronizeSystemAnimationFencesWithSpinCleanUpBlock:] + 572
27  UIKit                             0x18fdee664 __realPreCommitHandler_block_invoke + 416
28  QuartzCore                        0x18cf5be10 CA::Transaction::Fence::run_callbacks() const + 48
29  QuartzCore                        0x18cf334c4 CA::Context::commit_transaction(CA::Transaction*) + 480
30  QuartzCore                        0x18cf5aa68 CA::Transaction::commit() + 512
31  QuartzCore                        0x18cf5b488 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 120
32  CoreFoundation                    0x189c0e0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
33  CoreFoundation                    0x189c0bcf0 __CFRunLoopDoObservers + 372
34  CoreFoundation                    0x189b3a2d8 CFRunLoopRunSpecific + 476
35  possum                            0x1000ffaac UnityRepaint (UnityAppController+Rendering.mm:249)
36  possum                            0x1000ff8c0 -[UnityAppController(Rendering) repaint] (UnityAppController+Rendering.mm:60)
37  possum                            0x1000ff820 -[UnityAppController(Rendering) repaintDisplayLink] (UnityAppController+Rendering.mm:47)
38  QuartzCore                        0x18ceb6f24 CA::smile:isplay::smile:isplayLinkItem::dispatch(unsigned long long) + 44
39  QuartzCore                        0x18ceb6dd0 CA::smile:isplay::smile:isplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 444
40  IOKit                             0x189ece094 IODispatchCalloutFromCFMessage + 372
41  CoreFoundation                    0x189bf6e50 __CFMachPortPerform + 180
42  CoreFoundation                    0x189c0f218 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
43  CoreFoundation                    0x189c0e9cc __CFRunLoopDoSource1 + 436
44  CoreFoundation                    0x189c0c4b0 __CFRunLoopRun + 1840
45  CoreFoundation                    0x189b3a2b8 CFRunLoopRunSpecific + 444
46  GraphicsServices                  0x18b5ee198 GSEventRunModal + 180
47  UIKit                             0x18fb817fc -[UIApplication _run] + 684
48  UIKit                             0x18fb7c534 UIApplicationMain + 208
49  possum                            0x1000f39a0 main (main.mm:32)
50  libdyld.dylib                     0x188b1d5b8 start + 4

I did two things that have stopped this from occurring for me. I don’t know whether it was one or both:

  • I updated to Unity 5.3.7p2
  • I also removed the code I had which was manually changing orientations. I didn’t need that code any longer – I was changing orientation temporarily on startup because Unity hadn’t correctly been detecting orientation, and my splash was getting squashed into portrait, but apparently that bug was fixed a while back.

Either way, I’m not seeing any more reports of these crashes. Hope that helps some, best of luck!

1 Like