-1

I seem to be getting this error after my new release and its only happening on iOS 13 with most cases of upto 83% of the crash happening on iOS 13.3.1. I am not sure how to fix this error and I have been going through the code and cannot seem to figure out the change in iOS 13 that causes scrollViewDidScroll delegate method to crash the app.

Any help is greatly appreciated. It is also important to note that I haven't been able to reproduce this error, it only happens to users in production.

Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000104620bb0
Crashed: com.apple.main-thread
0  Motoz-AppStore             0x104620bb0 ProfileBrowserViewController.scrollViewDidScroll(_:) + 4299967408 (<compiler-generated>:4299967408)
1  Motoz-AppStore             0x104620d54 @objc ProfileBrowserViewController.scrollViewDidScroll(_:) + 4299967828 (<compiler-generated>:4299967828)
2  UIKitCore                      0x1be3c6a24 -[UIScrollView _notifyDidScroll] + 76
3  UIKitCore                      0x1be3b0c34 -[UIScrollView setContentOffset:] + 1016
4  UIKitCore                      0x1bd8153d4 -[UICollectionView setContentOffset:] + 48
5  UIKitCore                      0x1be3cdd28 -[UIScrollView _adjustContentOffsetIfNecessary] + 60
6  UIKitCore                      0x1be3af1cc -[UIScrollView setFrame:] + 484
7  UIKitCore                      0x1bd802e7c -[UICollectionView setFrame:] + 460
8  UIKitCore                      0x1be41b878 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
9  UIKitCore                      0x1be41c510 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
10 UIKitCore                      0x1be355b84 -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:] + 52
11 CoreFoundation                 0x1b9eed95c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
12 CoreFoundation                 0x1b9df0fb0 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
13 UIKitCore                      0x1be41b5e4 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
14 UIKitCore                      0x1be419938 -[UIView(Geometry) setFrame:] + 700
15 UIKitCore                      0x1bd8e519c -[UINavigationController _startCustomTransition:] + 1212
16 UIKitCore                      0x1bd8f9168 -[UINavigationController _startDeferredTransitionIfNeeded:] + 680
17 UIKitCore                      0x1bd8fa55c -[UINavigationController __viewWillLayoutSubviews] + 164
18 UIKitCore                      0x1bd8dd9e0 -[UILayoutContainerView layoutSubviews] + 224
19 UIKitCore                      0x1be43617c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140
20 QuartzCore                     0x1c099e2c0 -[CALayer layoutSublayers] + 284
21 QuartzCore                     0x1c09a443c CA::Layer::layout_if_needed(CA::Transaction*) + 480
22 QuartzCore                     0x1c09af140 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
23 QuartzCore                     0x1c08f7884 CA::Context::commit_transaction(CA::Transaction*, double) + 304
24 QuartzCore                     0x1c0921574 CA::Transaction::commit() + 676
25 QuartzCore                     0x1c0921f68 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
26 CoreFoundation                 0x1b9e97e68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
27 CoreFoundation                 0x1b9e92d54 __CFRunLoopDoObservers + 416
28 CoreFoundation                 0x1b9e93320 __CFRunLoopRun + 1308
29 CoreFoundation                 0x1b9e92adc CFRunLoopRunSpecific + 464
30 GraphicsServices               0x1c3e33328 GSEventRunModal + 104
31 UIKitCore                      0x1bdfa063c UIApplicationMain + 1936
32 Motoz-AppStore             0x1043fed70 main + 17 (TeraHeaderView.swift:17)
33 libdyld.dylib                  0x1b9d1c360 start + 4

kaddie
  • 233
  • 1
  • 5
  • 27
  • Show your code. – matt Mar 09 '20 at 06:01
  • this is the code implemented in the delegate method – kaddie Mar 09 '20 at 06:06
  • No, that’s the crash log. Now show us _your_ code that crashed. – matt Mar 09 '20 at 13:25
  • @kaddie if you want help you really should show the piece of code inside the ProfileBrowserViewController.scrollViewDidScroll method at the very least. If the view controller is not that big, it could also help to share the whole view controller. Actually the crash is inside your method, not inside the scrollView, so it may be very likely something related to your code alone. – Enricoza Mar 14 '20 at 11:22

1 Answers1

0

I can not say a concrete answer unless you show a piece of code but there is a possibility that error might occur because of delegation structure. Just in case check your delegation of scrollviews(tableviews, collection views, embedded web-views as well). Please check the link link for more info.

Mehmet Baykar
  • 367
  • 3
  • 11