Since our last app update (from Unity 2019.1 to 2019.3.11) I start seeing this crash on nearly all devices running iOS 13.3 and 13.3.1. Not a single crash on other iOS versions. Any ideas why? Only thing I can say is that it looks like a Unity bug.
I see in the stack trace UnityViewControllerBase+iOS.mm line 62 which is related to screen edges. And one change I have made since the last update is to disable auto-rotation in the app settings and set the default orientation to “Portrait”, so it may be related.
Would making - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
return UIEdgeRectAll
be a valid workaround until this gets fixed?
Native StackTrace:
Thread 0 (crashed)
0 UnityFramework 0x0000000102ebe69c IOSScripting::GetDeferSystemGesturesMode() (PlayerSettings.h:0)
1 UnityFramework 0x0000000102fdacd4 UnityGetDeferSystemGesturesTopEdge (TrampolineGlue.mm:52)
2 UnityFramework 0x000000010281e4d8 -[UnityViewControllerBase(iOS) preferredScreenEdgesDeferringSystemGestures] (UnityViewControllerBase+iOS.mm:62)
3 UIKitCore 0x00000001b992b0f8 -[_UISystemAppearanceManager updateScreenEdgesDeferringSystemGestures]
4 UIKitCore 0x5a46cf81b9b636f8 __70-[UIViewController setNeedsUpdateOfScreenEdgesDeferringSystemGestures]_block_invoke_2
5 UIKitCore 0xe7175381b9b43210 -[UIViewController _updateSystemAppearanceWithRecursionBlock:action:]
6 UIKitCore 0xae507c81b9b63314 -[UIViewController _setPresentedStatusBarViewController:]
7 UIKitCore 0x6c01f901b9b59538 -[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:]
8 UIKitCore 0xad2ac881ba62ed54 +[UIView(Animation) performWithoutAnimation:]
9 UIKitCore 0x4b320401b9b5918c -[UIViewController _dismissViewControllerWithTransition:from:completion:]
10 UIKitCore 0xd7500581b9b5884c -[UIViewController dismissViewControllerWithTransition:completion:]
11 UIKitCore 0x6b0ac681b9b58270 -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
12 UIKitCore 0x6b5db601b9b5aaf0 -[UIViewController dismissViewControllerAnimated:completion:]
13 UIKitCore 0x3f567201ba1c29f8 __68-[UIWindow _removeAllViewControllersFromWindowHierarchyFromDealloc:]_block_invoke
14 UIKitCore 0xb3514901b9b52500 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:]
15 UIKitCore 0x73218901ba1c2678 -[UIWindow _removeAllViewControllersFromWindowHierarchyFromDealloc:]
16 UIKitCore 0x8d0d3701ba1c2bb4 -[UIWindow setRootViewController:]
17 UnityFramework 0xe136b501028134dc GC_init_time
18 UnityFramework 0x0000000102814324 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:480)
19 UIKitCore 0x00000001ba18ebc0 -[UIApplication _terminateWithStatus:]
20 UIKitCore 0x0e6d3381b99202d0 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
21 UIKitCore 0x69214481b991ff2c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:]
22 UIKitCore 0x004bb281ba184dd4 -[UIApplication workspaceShouldExit:withTransitionContext:]
23 FrontBoardServices 0x216b9881bb27698c -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:]
24 FrontBoardServices 0xcd2ff381bb2a4264 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2
25 FrontBoardServices 0xbf592a81bb288ef4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
26 FrontBoardServices 0x2d166b81bb2a41f0 __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke
27 libdispatch.dylib 0xe95e5881b5d2dfd8 _dispatch_client_callout
28 libdispatch.dylib 0x8e7e4301b5d30d1c _dispatch_block_invoke_direct
29 FrontBoardServices 0x78619c01bb2cb254 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
30 FrontBoardServices 0xcf5ef201bb2caf00 -[FBSSerialQueue _queue_performNextIfPossible]
31 FrontBoardServices 0x0d781d01bb2cb46c -[FBSSerialQueue _performNextFromRunLoopSource]
32 CoreFoundation 0xaf17bf81b6004108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
33 CoreFoundation 0x590e5881b600405c __CFRunLoopDoSource0
34 CoreFoundation 0xb5510c01b6003818 __CFRunLoopDoSources0
35 CoreFoundation 0xab1a2b81b5ffe694 __CFRunLoopRun
36 CoreFoundation 0xbb4abf81b5ffdf40 CFRunLoopRunSpecific
37 GraphicsServices 0xd009c901c028e534 GSEventRunModal
38 UIKitCore 0x03169381ba189580 UIApplicationMain
39 UnityFramework 0xfd75b601028187fc GC_init_time
40 WordSearch 0x0000000100f4be1c main (main.mm:28)
41 libdyld.dylib 0x00000001b5e7ce18 start
I don’t know why the stack trace doesn’t appear in the post above, here it is:
We also have another huge amount of crashes that may be related (again dealing with screen measurements) with this stack trace:
Native StackTrace:
Thread 0 (crashed)
0 UnityFramework 0x0000000102ebf130 ViewInf:eyes:nDisplayCutoutsChanged(float const*, float const*, float const*, float const*, int) (ScreenManageriPhone.cpp:257)
1 UnityFramework 0x00000001028177bc ReportSafeAreaChangeForView(UIView*) (UnityView.mm:226)
2 UIKitCore 0x00000001ad50318c -[UIView _safeAreaInsetsDidChangeFromOldInsets:]
3 UIKitCore 0x00000001aca73180 -[UIViewController _updateViewSafeAreaInsetsAndEagerlyUpdateContentScrollView:]
4 UIKitCore 0x00000001aca738c4 -[UIViewController _setContentOverlayInsets:andLeftMargin:rightMargin:]
5 UIKitCore 0x00000001aca74454 -[UIViewController __updateContentOverlayInsetsToPresentationControllerBaseInsets]
6 UIKitCore 0x00000001aca742fc -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary]
7 UIKitCore 0x00000001aca73ab8 -[UIViewController _updateContentOverlayInsetsForSelfAndChildren]
8 UIKitCore 0x00000001aca8046c -[UIViewController _updateLayoutForStatusBarAndInterfaceOrientation]
9 UIKitCore 0x00000001aca8500c -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]
10 UIKitCore 0x00000001ad524f54 -[UIView(Internal) _didMoveFromWindow:toWindow:]
11 UIKitCore 0x00000001ad5190e0 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke
12 Foundation 0x00000001a92e9ffc -[NSISEngine withBehaviors:performModifications:]
13 UIKitCore 0x00000001ad518fe4 -[UIView(Hierarchy) _postMovedFromSuperview:]
14 UIKitCore 0x00000001ad5278d0 -[UIView(Internal) _addSubview:positioned:relativeTo:]
15 UIKitCore 0x00000001acaa2724 -[UIViewControllerBuiltinTransitionViewAnimator animateTransition:]
16 UIKitCore 0x00000001acaa9d48 ___UIViewControllerTransitioningRunCustomTransition_block_invoke_2
17 UIKitCore 0x00000001acbb79dc +[UIInputResponderController _pinInputViewsForInputResponderController:onBehalfOfResponder:duringBlock:]
18 UIKitCore 0x00000001acaa9cd8 ___UIViewControllerTransitioningRunCustomTransition_block_invoke.645
19 UIKitCore 0x00000001ad5208cc +[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]
20 UIKitCore 0x00000001acaa9b40 _UIViewControllerTransitioningRunCustomTransition
21 UIKitCore 0x00000001ac9a1234 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.465
22 UIKitCore 0x00000001ac9a6a2c +[UIPresentationController _scheduleTransition:]
23 UIKitCore 0x00000001ac9a0680 -[UIPresentationController runTransitionForCurrentState]
24 UIKitCore 0x00000001ac99def0 -[UIPresentationController _dismissWithAnimationController:interactionController:target:didEndSelector:]
25 UIKitCore 0x00000001aca9201c __99-[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:]_block_invoke_2
26 UIKitCore 0x00000001ad520c14 +[UIView(Animation) performWithoutAnimation:]
27 UIKitCore 0x00000001aca91e98 -[UIViewController _dismissViewControllerWithAnimationController:interactionController:completion:]
28 UIKitCore 0x00000001ad520c14 +[UIView(Animation) performWithoutAnimation:]
29 UIKitCore 0x00000001aca91b4c -[UIViewController _dismissViewControllerWithTransition:from:completion:]
30 UIKitCore 0x00000001aca91228 -[UIViewController dismissViewControllerWithTransition:completion:]
31 UIKitCore 0x00000001aca90c90 -[UIViewController _performCoordinatedPresentOrDismiss:animated:]
32 UIKitCore 0x00000001aca933a0 -[UIViewController dismissViewControllerAnimated:completion:]
33 UIKitCore 0x00000001ad0d028c __68-[UIWindow _removeAllViewControllersFromWindowHierarchyFromDealloc:]_block_invoke
34 UIKitCore 0x00000001aca8b154 +[UIViewController _performWithoutDeferringTransitionsAllowingAnimation:actions:]
35 UIKitCore 0x00000001ad0cff1c -[UIWindow _removeAllViewControllersFromWindowHierarchyFromDealloc:]
36 UIKitCore 0x00000001ad0d0438 -[UIWindow setRootViewController:]
37 UnityFramework 0x00000001028134dc UnityCleanupTrampoline (UnityAppController.mm:168)
38 UnityFramework 0x0000000102814324 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:480)
39 UIKitCore 0x00000001ad09dae0 -[UIApplication _terminateWithStatus:]
40 UIKitCore 0x00000001ac8638b8 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
41 UIKitCore 0x00000001ac863538 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:]
42 UIKitCore 0x00000001ad093e80 -[UIApplication workspaceShouldExit:withTransitionContext:]
43 FrontBoardServices 0x00000001ae13e90c -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:]
44 FrontBoardServices 0x00000001ae16a05c __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2
45 FrontBoardServices 0x00000001ae14ff04 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
46 FrontBoardServices 0x00000001ae169fec __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke
47 libdispatch.dylib 0x00000001a8cdf184 _dispatch_client_callout
48 libdispatch.dylib 0x00000001a8c87fd8 _dispatch_block_invoke_direct$VARIANT$mp
49 FrontBoardServices 0x00000001ae18f418 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK
50 FrontBoardServices 0x00000001ae18f0e4 -[FBSSerialQueue _queue_performNextIfPossible]
51 FrontBoardServices 0x00000001ae18f60c -[FBSSerialQueue _performNextFromRunLoopSource]
52 CoreFoundation 0x00000001a8f90a00 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
53 CoreFoundation 0x00000001a8f90958 __CFRunLoopDoSource0
54 CoreFoundation 0x00000001a8f900f0 __CFRunLoopDoSources0
55 CoreFoundation 0x00000001a8f8b23c __CFRunLoopRun
56 CoreFoundation 0x00000001a8f8aadc CFRunLoopRunSpecific
57 GraphicsServices 0x00000001b2f2b328 GSEventRunModal
58 UIKitCore 0x00000001ad09863c UIApplicationMain
59 UnityFramework 0x00000001028187fc -[UnityFramework runUIApplicationMainWithArgc:argv:] (main.mm:96)
60 WordSearch 0x0000000100fdfe1c main (main.mm:28)
61 libdyld.dylib 0x00000001a8e14360 start
We’re experiencing countless of crashes with this as well, did you manage to find a solution?
Alexey
June 9, 2020, 12:14pm
5
ohffs apple! both stacktraces are coming from ios poking unity view/viewcontroller upon exit (sure enough it is close to impossible to catch by chance as they are usually dependent on ios version, device, showing presentation controller (ads), etc.
the one about ViewInf:eyes:nDisplayCutoutsChanged - was fixed very recently (not yet released)
UnityGetDeferSystemGesturesTopEdge - i see for the first time - can you please file a bug report (stacktrace would be enough)
We are seeing these crashes as well. iOS 13.4.1 - 13.5.1
Native StackTrace:
Thread 0 (crashed)
0 UnityFramework 0x00000001066d2d5c IOSScripting::GetDeferSystemGesturesMode() (PlayerSettings.h:0)
1 UnityFramework 0x0000000106894354 UnityGetDeferSystemGesturesTopEdge (TrampolineGlue.mm:52)
2 UnityFramework 0x000000010601f854 -[UnityViewControllerBase(iOS) preferredScreenEdgesDeferringSystemGestures] (UnityViewControllerBase+iOS.mm:62)
3 UIKitCore 0x00000001c45098dc <system symbols missing>
4 UIKitCore 0x00000001c4736c84 <system symbols missing>
5 UIKitCore 0x00000001c4717764 <system symbols missing>
6 UIKitCore 0x00000001c47368cc <system symbols missing>
7 UIKitCore 0x00000001c472d0b0 <system symbols missing>
8 UIKitCore 0x00000001c52031cc <system symbols missing>
9 UIKitCore 0x00000001c472cd24 <system symbols missing>
10 UIKitCore 0x00000001c472c3fc <system symbols missing>
11 UIKitCore 0x00000001c472be64 <system symbols missing>
12 UIKitCore 0x00000001c472e56c <system symbols missing>
13 UIKitCore 0x00000001c4d94bb0 <system symbols missing>
14 UIKitCore 0x00000001c4726320 <system symbols missing>
15 UIKitCore 0x00000001c4d94850 <system symbols missing>
16 UIKitCore 0x00000001c4d94d5c <system symbols missing>
17 UnityFramework 0x0000000106014880 UnityCleanupTrampoline (UnityAppController.mm:174)
18 UnityFramework 0x00000001060156c8 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:486)
19 UIKitCore 0x00000001c4d61a04 <system symbols missing>
20 UIKitCore 0x00000001c44ff218 <system symbols missing>
21 UIKitCore 0x00000001c44feea0 <system symbols missing>
22 UIKitCore 0x00000001c4d57ba4 <system symbols missing>
23 FrontBoardServices 0x00000001c5e258a0 <system symbols missing>
24 FrontBoardServices 0x00000001c5e509bc <system symbols missing>
25 FrontBoardServices 0x00000001c5e36bfc <system symbols missing>
26 FrontBoardServices 0x00000001c5e5094c <system symbols missing>
27 libdispatch.dylib 0x00000001c097b524 <system symbols missing>
28 libdispatch.dylib 0x00000001c0955808 <system symbols missing>
29 FrontBoardServices 0x00000001c5e75850 <system symbols missing>
30 FrontBoardServices 0x00000001c5e7551c <system symbols missing>
31 FrontBoardServices 0x00000001c5e75a44 <system symbols missing>
32 CoreFoundation 0x00000001c0c33c18 <system symbols missing>
33 CoreFoundation 0x00000001c0c33b70 <system symbols missing>
34 CoreFoundation 0x00000001c0c332f8 <system symbols missing>
35 CoreFoundation 0x00000001c0c2e328 <system symbols missing>
36 CoreFoundation 0x00000001c0c2dce8 <system symbols missing>
37 GraphicsServices 0x00000001cad7838c <system symbols missing>
38 UIKitCore 0x00000001c4d5c444 <system symbols missing>
39 UnityFramework 0x0000000106019b94 -[UnityFramework runUIApplicationMainWithArgc:argv:] (main.mm:96)
40 interstellarplutocracy 0x0000000102c5fe1c main (main.mm:28)
41 libdyld.dylib 0x00000001c0ab58f0 <system symbols missing>
Same here, we’re observing countless crash reports!
As a workaround we update the preferredScreenEdgesDeferringSystemGestures
in
UnityViewControllerBase+iOS.mm with a PostProcessBuild method. After that we experience crashes with prefersHomeIndicatorAutoHidden
which we also updated.
Thread 0 (crashed)
0 UnityFramework 0x00000001066e7934 IOSScripting::GetHideHomeButton() (PlayerSettings.h:0)
1 UnityFramework 0x00000001068a9144 UnityGetHideHomeButton (TrampolineGlue.mm:72)
2 UnityFramework 0x0000000106034324 -[UnityViewControllerBase(iOS) prefersHomeIndicatorAutoHidden] (UnityViewControllerBase+iOS.mm:66)
3 UIKitCore 0x000000019273171c <system symbols missing>
4 UIKitCore 0x000000019295ee10 <system symbols missing>
5 UIKitCore 0x000000019293f764 <system symbols missing>
6 UIKitCore 0x000000019295e8dc <system symbols missing>
7 UIKitCore 0x00000001929550b0 <system symbols missing>
8 UIKitCore 0x000000019342b1cc <system symbols missing>
9 UIKitCore 0x0000000192954d24 <system symbols missing>
10 UIKitCore 0x00000001929543fc <system symbols missing>
11 UIKitCore 0x0000000192953e64 <system symbols missing>
12 UIKitCore 0x000000019295656c <system symbols missing>
13 UIKitCore 0x0000000192fbcbb0 <system symbols missing>
14 UIKitCore 0x000000019294e320 <system symbols missing>
15 UIKitCore 0x0000000192fbc850 <system symbols missing>
16 UIKitCore 0x0000000192fbcd5c <system symbols missing>
17 UnityFramework 0x0000000106029330 UnityCleanupTrampoline (UnityAppController.mm:174)
18 UnityFramework 0x000000010602a1d0 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:493)
19 UIKitCore 0x0000000192f89a04 <system symbols missing>
20 UIKitCore 0x0000000192727218 <system symbols missing>
21 UIKitCore 0x0000000192726ea0 <system symbols missing>
22 UIKitCore 0x0000000192f7fba4 <system symbols missing>
23 FrontBoardServices 0x000000019404d8a0 <system symbols missing>
24 FrontBoardServices 0x00000001940789bc <system symbols missing>
25 FrontBoardServices 0x000000019405ebfc <system symbols missing>
26 FrontBoardServices 0x000000019407894c <system symbols missing>
27 libdispatch.dylib 0x000000018eba3524 <system symbols missing>
28 libdispatch.dylib 0x000000018eb7d808 <system symbols missing>
29 FrontBoardServices 0x000000019409d850 <system symbols missing>
30 FrontBoardServices 0x000000019409d51c <system symbols missing>
31 FrontBoardServices 0x000000019409da44 <system symbols missing>
32 CoreFoundation 0x000000018ee5bc18 <system symbols missing>
33 CoreFoundation 0x000000018ee5bb70 <system symbols missing>
34 CoreFoundation 0x000000018ee5b2f8 <system symbols missing>
35 CoreFoundation 0x000000018ee56328 <system symbols missing>
36 CoreFoundation 0x000000018ee55ce8 <system symbols missing>
37 GraphicsServices 0x0000000198fa038c <system symbols missing>
38 UIKitCore 0x0000000192f84444 <system symbols missing>
39 UnityFramework 0x000000010602e660 -[UnityFramework runUIApplicationMainWithArgc:argv:] (main.mm:96)
40 interstellarplutocracy 0x00000001042e3e1c main (main.mm:28)
41 libdyld.dylib 0x000000018ecdd8f0 <system symbols missing>
We also upgraded to Unity 2019.4.1
i did a fix for both IOSScripting::GetHideHomeButton() and IOSScripting::GetDeferSystemGesturesMode() crashes (can i whine that i didnt see the bugs reported?) and it should trickle down to LTS versions soonish
1 Like
@Alexey I’m getting the bug mentioned earlier where you get crash on exit in ViewInfo OnDisplayCutoutsChanged
…this is with the latest LTS, Unity2019.3.4, so I’m guessing the fix still hasn’t been released?
Can we get a bug number/link, so we can know which release has the fix if it’s still pending?
Also, AFAICT, there is no patch release of 2019 LTS with this fix?
Hi all!
So is this issue related to iOS API breaking change?