iPad Crash on QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)

We are seeing this error specifically on iPad. But we are not able to reproduce it. From time to time this happens on users' iPad devices but it does happen randomly.

Please checkout the crash log obtained by Firebase Crashlytics. Any help would be appreciated.

For layout, we are using SnapKit.

Crashed: com.apple.main-thread
0  libobjc.A.dylib                0x1785 objc_msgSend + 5
1  QuartzCore                     0x16c19d CA::Layer::layout_if_needed(CA::Transaction*) + 575
2  QuartzCore                     0x165a64 -[CALayer layoutIfNeeded] + 362
3  UIKitCore                      0x4e23a0 __86-[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:newSize:]_block_invoke + 52
4  UIKitCore                      0x114d776 +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 573
5  UIKitCore                      0x114dc51 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 87
6  UIKitCore                      0x4e231c -[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:newSize:] + 320
7  UIKitCore                      0x4ea05e __104-[UIViewController(AdaptiveSizing_Internal) _window:viewWillTransitionToSize:withTransitionCoordinator:]_block_invoke.3266 + 54
8  UIKitCore                      0x4f31f6 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 294
9  UIKitCore                      0x4ef6b1 -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 263
10 UIKitCore                      0x114d776 +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 573
11 UIKitCore                      0x114dc51 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 87
12 UIKitCore                      0x50db15 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2 + 277
13 UIKitCore                      0x11515a0 +[UIView _performBlockDelayingTriggeringResponderEvents:forScene:] + 207
14 UIKitCore                      0x50d8a0 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke + 158
15 UIKitCore                      0x114d776 +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 573
16 UIKitCore                      0x114dc51 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 87
17 UIKitCore                      0x50d77e -[_UIWindowRotationAnimationController animateTransition:] + 491
18 UIKitCore                      0xc3f43e -[UIWindow _rotateToBounds:withAnimator:transitionContext:] + 525
19 UIKitCore                      0xc42131 -[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:] + 2330
20 UIKitCore                      0xc42712 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 615
21 UIKitCore                      0xc416c3 -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 99
22 UIKitCore                      0xc405b6 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 218
23 UIKitCore                      0xc403d8 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 1447
24 CoreFoundation                 0x52f12 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
25 CoreFoundation                 0x52ee1 ___CFXRegistrationPost_block_invoke + 49
26 CoreFoundation                 0x525ff _CFXRegistrationPost + 454
27 CoreFoundation                 0x51f6d _CFXNotificationPost + 796
28 Foundation                     0xc998a -[NSNotificationCenter postNotificationName:object:userInfo:] + 59
29 UIKitCore                      0x7d31ea -[UIDevice setOrientation:animated:] + 281
30 UIKitCore                      0x22a516 __134-[_UIWindowSceneDeviceOrientationSettingsDiffAction _updateDeviceOrientationWithSettingObserverContext:windowScene:transitionContext:]_block_invoke + 137
31 UIKitCore                      0x6bc613 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 871
32 UIKitCore                      0x7cf5c6 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240
33 UIKitCore                      0x22a45b -[_UIWindowSceneDeviceOrientationSettingsDiffAction _updateDeviceOrientationWithSettingObserverContext:windowScene:transitionContext:] + 248
34 UIKitCore                      0x22a2d8 -[_UIWindowSceneDeviceOrientationSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 233
35 UIKitCore                      0x4f75f __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 797
36 UIKitCore                      0x4e209 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
37 UIKitCore                      0x4f398 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 208
38 UIKitCore                      0x6e4e8b -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 502
39 FrontBoardServices             0x88c7 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 530
40 FrontBoardServices             0x32149 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 133
41 FrontBoardServices             0x15ad5 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
42 FrontBoardServices             0x32091 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 372
43 libdispatch.dylib              0x3508 _dispatch_client_callout + 8
44 libdispatch.dylib              0x6052 _dispatch_block_invoke_direct + 281
45 FrontBoardServices             0x567a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
46 FrontBoardServices             0x5648b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
47 FrontBoardServices             0x56950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
48 CoreFoundation                 0x8038a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
49 CoreFoundation                 0x80282 __CFRunLoopDoSource0 + 180
50 CoreFoundation                 0x7f764 __CFRunLoopDoSources0 + 248
51 CoreFoundation                 0x79f2f __CFRunLoopRun + 878
52 CoreFoundation                 0x796d6 CFRunLoopRunSpecific + 567
53 GraphicsServices               0x3db3 GSEventRunModal + 139
54 UIKitCore                      0xbf7cf7 -[UIApplication _run] + 912
55 UIKitCore                      0xbfcba8 UIApplicationMain + 101
56 edX                            0x487f88 main + 15 (main.m:15)
57 libdyld.dylib                  0x13e9 start + 1

We have the same problem and didn't solve it

iPad Crash on QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
 
 
Q