首页 > 解决方案 > ScrollViewDidScroll EXC_BREAKPOINT 仅在 iOS 13 上崩溃

问题描述

在我的新版本发布后,我似乎遇到了这个错误,它只发生在 iOS 13 上,大多数情况下,高达 83% 的崩溃发生在 iOS 13.3.1 上。我不确定如何修复此错误,并且我一直在查看代码,似乎无法弄清楚 iOS 13 中导致 scrollViewDidScroll 委托方法崩溃应用程序的更改。

任何帮助是极大的赞赏。同样重要的是要注意我无法重现此错误,它只发生在生产中的用户身上。

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

标签: iosswiftuikit

解决方案


除非您显示一段代码,否则我无法说出具体的答案,但是由于委托结构,可能会发生错误。以防万一检查您的滚动视图委托(表格视图、集合视图、嵌入式 Web 视图)。请检查链接 链接以获取更多信息。


推荐阅读