Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on EMPageViewController.layoutViews() + 536 #527

Closed
FrancoisLefevre12 opened this issue Oct 7, 2020 · 4 comments
Closed

Crash on EMPageViewController.layoutViews() + 536 #527

FrancoisLefevre12 opened this issue Oct 7, 2020 · 4 comments

Comments

@FrancoisLefevre12
Copy link

Hello there !

We are using your library since few months now and we are having just one big issue with it.

We create an instance of PagingViewController, we insert it into a view controller which is presented modally.
In this PagingViewController instance we add some sub view controllers which have tableViews inside for some of them.

It appears that the crash occurs when we call the reloadData() method for one these tableViews. In fact, there is a tab where we can scroll along a tableView and there is pagination on this tab, so we call the reloadData() method a lot when scrolling (it may be a clue).

Type of crash given by Crashlytics :

Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010
EMPageViewController.layoutViews()

Here is the stacktrace from Crashlytics logs :

Crashed: com.apple.main-thread
0   libobjc.A.dylib                0x1bc1eab30 objc_msgSend + 16
1   UIKitCore                      0x1c0960f44 -[UIView(AdditionalLayoutSupport) _nsis_center:bounds:inEngine:forLayoutGuide:] + 108
2   UIKitCore                      0x1c096f18c -[UILayoutGuide _updateLayoutFrameInOwningView:fromEngine:] + 68
3   UIKitCore                      0x1c09604d4 -[UIView(AdditionalLayoutSupport) _is_layout] + 284
4   UIKitCore                      0x1c0a21728 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032
5   UIKitCore                      0x1c0a347fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144
6   QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
7   QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
8   UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
9   UIKitCore                      0x1c0a1803c -[UIView(Geometry) setFrame:] + 836
10  ProjectName                   0x1053ff674 EMPageViewController.layoutViews() + 536 (__hidden#182_:536)
11  ProjectName                      0x1053fe50c EMPageViewController.viewWillLayoutSubviews() + 352 (__hidden#182_:352)
12  ProjectName                      0x1053fe564 _hidden#33_ + 4389692772 (__hidden#184_:4389692772)
13  UIKitCore                      0x1c0a344b0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1300
14  QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
15  QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
16  UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
17  UIKitCore                      0x1c0a1af3c -[UIView(Geometry) setBounds:] + 840
18  UIKitCore                      0x1c0a1a764 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 528
19  UIKitCore                      0x1c0a1ab24 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136
20  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
21  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
22  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
23  UIKitCore                      0x1c096044c -[UIView(AdditionalLayoutSupport) _is_layout] + 148
24  UIKitCore                      0x1c0a21728 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032
25  UIKitCore                      0x1c0a347fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144
26  QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
27  QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
28  UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
29  UIKitCore                      0x1c0a1af3c -[UIView(Geometry) setBounds:] + 840
30  UIKitCore                      0x1c0a1a764 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 528
31  UIKitCore                      0x1c0a1ab24 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136
32  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
33  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
34  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
35  UIKitCore                      0x1c096044c -[UIView(AdditionalLayoutSupport) _is_layout] + 148
36  UIKitCore                      0x1c0a21728 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032
37  UIKitCore                      0x1c0a347fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144
38  QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
39  QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
40  UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
41  UIKitCore                      0x1c0a1af3c -[UIView(Geometry) setBounds:] + 840
42  UIKitCore                      0x1c0a1a764 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 528
43  UIKitCore                      0x1c0a1ab24 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136
44  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
45  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
46  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
47  UIKitCore                      0x1c096044c -[UIView(AdditionalLayoutSupport) _is_layout] + 148
48  UIKitCore                      0x1c0a21728 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032
49  UIKitCore                      0x1c0a347fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144
50  QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
51  QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
52  UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
53  UIKitCore                      0x1c0a1803c -[UIView(Geometry) setFrame:] + 836
54  UIKitCore                      0x1c0a19ee4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
55  UIKitCore                      0x1c0a1ab88 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
56  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
57  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
58  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
59  UIKitCore                      0x1c0a17fac -[UIView(Geometry) setFrame:] + 692
60  UIKitCore                      0x1c0a19ee4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
61  UIKitCore                      0x1c0a1ab88 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
62  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
63  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
64  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
65  UIKitCore                      0x1c0a17fac -[UIView(Geometry) setFrame:] + 692
66  UIKitCore                      0x1c0a19ee4 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
67  UIKitCore                      0x1c0a1ab88 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
68  CoreFoundation                 0x1bc49fce0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
69  CoreFoundation                 0x1bc3a3cec -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
70  UIKitCore                      0x1c0a19c40 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
71  UIKitCore                      0x1c0a17fac -[UIView(Geometry) setFrame:] + 692
72  UIKitCore                      0x1c0a12780 -[UIView _setFrameIgnoringLayerTransform:] + 376
73  UIKitCore                      0x1bfe72b80 -[_UISheetPresentationController _updatePresentedViewFrame] + 108
74  UIKitCore                      0x1bfe728f8 -[_UISheetPresentationController _containerViewLayoutSubviews] + 2224
75  UIKitCore                      0x1c09f4efc -[UITransitionView layoutSubviews] + 88
76  UIKitCore                      0x1c0a347fc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2144
77  QuartzCore                     0x1c2fd8494 -[CALayer layoutSublayers] + 284
78  QuartzCore                     0x1c2fde5ec CA::Layer::layout_if_needed(CA::Transaction*) + 468
79  UIKitCore                      0x1c0a20ac8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 540
80  UIKitCore                      0x1bfe6faf8 -[_UISheetPresentationController _sheetLayoutInfoLayout:] + 48
81  UIKitCore                      0x1bfe6d3bc -[_UISheetLayoutInfo _layout] + 312
82  UIKitCore                      0x1bfe74264 -[_UISheetPresentationController sheetInteraction:didChangeOffset:] + 2208
83  UIKitCore                      0x1bfbae328 -[_UISheetInteraction sendCurrentOffsetDidChange] + 140
84  UIKitCore                      0x1bfbaf8fc __58-[_UISheetInteraction draggingEndedInSource:withVelocity:]_block_invoke + 36
85  UIKitCore                      0x1bfbdac58 -[UIViewPropertyAnimator _runAnimations] + 200
86  UIKitCore                      0x1bfbe21d0 __49-[UIViewPropertyAnimator startAnimationAsPaused:]_block_invoke_2 + 104
87  UIKitCore                      0x1bfbe2038 __49-[UIViewPropertyAnimator startAnimationAsPaused:]_block_invoke + 120
88  UIKitCore                      0x1bfbe2144 __49-[UIViewPropertyAnimator startAnimationAsPaused:]_block_invoke.1000 + 248
89  UIKitCore                      0x1bfbe1834 -[UIViewPropertyAnimator _setupAnimationTracking:] + 124
90  UIKitCore                      0x1bfbe1d54 -[UIViewPropertyAnimator startAnimationAsPaused:] + 980
91  UIKitCore                      0x1bfbaf84c -[_UISheetInteraction draggingEndedInSource:withVelocity:] + 1012
92  UIKitCore                      0x1bfbae9d0 -[_UISheetInteraction handlePan:] + 180
93  UIKitCore                      0x1c0158ca4 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 48
94  UIKitCore                      0x1c016219c _UIGestureRecognizerSendTargetActions + 124
95  UIKitCore                      0x1c015ebf0 _UIGestureRecognizerSendActions + 352
96  UIKitCore                      0x1c015e168 -[UIGestureRecognizer _updateGestureForActiveEvents] + 652
97  UIKitCore                      0x1c0151bd8 _UIGestureEnvironmentUpdate + 2148
98  UIKitCore                      0x1c0151328 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 372
99  UIKitCore                      0x1c01510f4 -[UIGestureEnvironment _updateForEvent:window:] + 232
100 UIKitCore                      0x1c05bcc48 -[UIWindow sendEvent:] + 3440
101 UIKitCore                      0x1c05988ec -[UIApplication sendEvent:] + 344
102 UIKitCore                      0x1c0619970 __dispatchPreprocessedEventFromEventQueue + 6808
103 UIKitCore                      0x1c061c4ec __handleEventQueueInternal + 5364
104 UIKitCore                      0x1c0614168 __handleHIDEventFetcherDrain + 140
105 CoreFoundation                 0x1bc44aad8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
106 CoreFoundation                 0x1bc44aa30 __CFRunLoopDoSource0 + 80
107 CoreFoundation                 0x1bc44a1b8 __CFRunLoopDoSources0 + 184
108 CoreFoundation                 0x1bc4451e8 __CFRunLoopRun + 788
109 CoreFoundation                 0x1bc444ba8 CFRunLoopRunSpecific + 424
110 GraphicsServices               0x1c65bb344 GSEventRunModal + 160
111 UIKitCore                      0x1c05803e4 UIApplicationMain + 1932
112 ProjectName                 0x10496dfc0 main + 28 (ProductQuestionsAnswersSceneBuilder.swift:28)
113 libdyld.dylib                  0x1bc2cc8f0 start + 4

Thank you in advance !
François

@rechsteiner
Copy link
Owner

Hi @FrancoisLefevre12! I've moved away from using EMPageViewController in Parchment in version 3.0. Could you try to target the v3.0.0-beta2 release and see if the crash goes away? The new version should be stable enough to use in production.

@FrancoisLefevre12
Copy link
Author

Hello !

Okay cool ! We will try this beta then, alright !
Do you know the release schedule for this 3.0?
Thanks for your answer 👍

Regards,
François

@rechsteiner
Copy link
Owner

No specific release date, but probably in a few weeks or so 🙂

@rechsteiner
Copy link
Owner

The new version is out now 🥳 https://github.com/rechsteiner/Parchment/releases/tag/v3.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants