HWPanModal icon indicating copy to clipboard operation
HWPanModal copied to clipboard

CRASH

Open devSC opened this issue 2 years ago • 15 comments

OS Version: iOS 14.6 (18F72) Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: BUS_NOOP at 0x000000016fb33f20 Crashed Thread: 0

Application Specific Information: center > Stack overflow in (null)

Thread 0 Crashed: 0 QuartzCore 0x309d36680 CA::Layer::writable_state 1 QuartzCore 0x309d36858 CA::Layer::property_did_change 2 QuartzCore 0x309d367b8 CA::Layer::end_change 3 QuartzCore 0x309d3f748 CA::Layer::set_position 4 QuartzCore 0x309d2db00 -[CALayer setPosition:] 5 QuartzCore 0x309d2e194 -[CALayer setFrame:] 6 UIKitCore 0x30855bbb0 -[UIView(Geometry) setFrame:] 7 UIKitCore 0x308502274 -[UIScrollView _layoutHorizontalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:verticalIndicatorFrame:] 8 UIKitCore 0x30850165c -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] 9 UIKitCore 0x3084ed9bc -[UIScrollView setContentOffset:] 10 UIKitCore 0x308279c48 -[UITableView setContentOffset:] 11 Foundation 0x305ef8c14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] 12 Foundation 0x305e3d63c -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] 13 Foundation 0x305ef4650 _NSSetPointValueAndNotify 14 UIKitCore 0x308509fe4 -[UIScrollView _setContentOffset:animated:animationCurve:animationAdjustsForContentOffsetDelta:animation:animationConfigurator:] 15 HWPanModal 0x10298174c -[HWPanModalPresentableHandler haltScrolling:] (HWPanModalPresentableHandler.m:347) 16 HWPanModal 0x1029818d4 -[HWPanModalPresentableHandler didPanOnScrollViewChanged:] 17 HWPanModal 0x102989b24 -[KeyValueObserver didChange:] (KeyValueObserver.m:72) 18 Foundation 0x305ef6dac NSKeyValueNotifyObserver 19 Foundation 0x305ef91c4 NSKeyValueDidChange 20 Foundation 0x305ef8c50 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] 21 Foundation 0x305e3d63c -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] 22 Foundation 0x305ef4650 _NSSetPointValueAndNotify 23 UIKitCore 0x30825a7c4 -[UITableView _updateVisibleCellsNow:] 24 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 25 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 26 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 27 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 28 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 29 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 30 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 31 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 32 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 33 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 34 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 35 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 36 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 37 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 38 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 39 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 40 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 41 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 42 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 43 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 44 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 45 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 46 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 47 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 48 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 49 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 50 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 51 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 52 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 53 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 54 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 55 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 56 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 57 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 58 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 59 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 60 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 61 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 62 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 63 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 64 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 65 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 66 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 67 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 68 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 69 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 70 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 71 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 72 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 73 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 74 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 75 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 76 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 77 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 78 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 79 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 80 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 81 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 82 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 83 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 84 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 85 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 86 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 87 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 88 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 89 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 90 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 91 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 92 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 93 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 94 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 95 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 96 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 97 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 98 UIKitCore 0x30825a7ec [inlined] -[UITableView _updateVisibleCellsNow:] 99 UIKitCore 0x30825a7ec -[UITableView _updateVisibleCellsNow:]

devSC avatar Aug 27 '21 12:08 devSC

https://developer.apple.com/forums/thread/118975 不太确定是我这边引起的,或者你有重现demo看下

HeathWang avatar Aug 30 '21 02:08 HeathWang

不太好复现,但的确能遇到。

xcode 调试时遇到崩溃会定位到:

15 HWPanModal 0x10298174c -[HWPanModalPresentableHandler haltScrolling:] (HWPanModalPresentableHandler.m:347)

devSC avatar Aug 31 '21 02:08 devSC

- (void)haltScrolling:(UIScrollView *)scrollView {
    [scrollView setContentOffset:CGPointMake(0, self.scrollViewYOffset) animated:NO];
    scrollView.showsVerticalScrollIndicator = NO;
}

这个方法只是设置了contentOffset,很奇怪

HeathWang avatar Aug 31 '21 08:08 HeathWang

有点像这2个问题

https://github.com/slackhq/PanModal/issues/142 https://github.com/slackhq/PanModal/issues/157

devSC avatar Oct 29 '21 08:10 devSC

https://github.com/slackhq/PanModal/issues/142

按照这个问题的 case 可以复现

@HeathWang 可以试试

devSC avatar Dec 08 '21 05:12 devSC

slackhq/PanModal#142

按照这个问题的 case 可以复现

@HeathWang 可以试试

这个可以修复crash吗?

HeathWang avatar Dec 09 '21 03:12 HeathWang

@devSC 你的分支2个commit解决这个问题没,我merge到master?

HeathWang avatar Dec 23 '21 02:12 HeathWang

@HeathWang 还有问题

devSC avatar Jan 11 '22 08:01 devSC

遇到同样的问题:

Thread 0 name: Tmcom-MapDRender Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 UIKitCore 0x183a548dc -[UIView animationInfoCreateIfNecessary:] + 4 1 UIKitCore 0x183a60514 -[UIView(UIKitManual) actionForLayer:forKey:] + 40 2 QuartzCore 0x185182e3c -[CALayer actionForKey:] + 156 3 QuartzCore 0x185109eb8 CA::Layer::begin_change(CA::Transaction*, unsigned int, objc_object*, objc_object*&) + 224 4 QuartzCore 0x1850dc42c CA::Layer::set_position(CA::Vec2 const&, bool) + 280 5 QuartzCore 0x18518c1d4 -[CALayer setPosition:] + 48 6 QuartzCore 0x1851a2bb0 -[CALayer setFrame:] + 424 7 UIKitCore 0x183a7596c -[UIView(Geometry) setFrame:] + 428 8 UIKitCore 0x183c7c674 -[UIScrollView _layoutHorizontalScrollIndicatorWithBounds:effectiveInset:contentOffset:fraction:additionalInset:cornerAdjust:showing:recalcSize:verticalIndicatorFrame:] + 1336 9 UIKitCore 0x183bfcde4 -[UIScrollView _adjustScrollerIndicators:alwaysShowingThem:] + 1292 10 UIKitCore 0x183a6b0e8 -[UIScrollView setContentOffset:] + 1236 11 UIKitCore 0x183aba45c -[UITableView setContentOffset:] + 284 12 Foundation 0x182d036cc -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 572 13 Foundation 0x182cf9a14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68 14 Foundation 0x182cf7bec _NSSetPointValueAndNotify + 300 15 UIKitCore 0x183ab34c0 -[UIScrollView _setContentOffset:animated:animationCurve:animationAdjustsForContentOffsetDelta:animation:animationConfigurator:] + 820 16 HWPanModal 0x1059955d4 -[HWPanModalPresentableHandler haltScrolling:] + 80 17 HWPanModal 0x10599575c -[HWPanModalPresentableHandler didPanOnScrollViewChanged:] + 352 18 HWPanModal 0x10599da3c -[KeyValueObserver didChange:] + 160 19 Foundation 0x182d0983c NSKeyValueNotifyObserver + 288 20 Foundation 0x182cf5d48 NSKeyValueDidChange + 372 21 Foundation 0x182d03708 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] + 632 22 Foundation 0x182cf9a14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 68 23 Foundation 0x182cf7bec _NSSetPointValueAndNotify + 300 24 UIKitCore 0x183b91e7c -[UITableView _updateVisibleCellsNow:] + 2428 25 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 26 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 27 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 28 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 29 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 30 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 31 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 32 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 33 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 34 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 35 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 36 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 37 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 38 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 39 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 40 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 41 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 42 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 43 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 44 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 45 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 46 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 47 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 48 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 49 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 50 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 51 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 52 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 53 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 54 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 55 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 56 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 57 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 58 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 59 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 60 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 61 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 62 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 63 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 64 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 65 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 66 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 67 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 68 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 69 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 70 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480 71 UIKitCore 0x183b91eb0 -[UITableView _updateVisibleCellsNow:] + 2480

yangjie2 avatar Jun 14 '22 12:06 yangjie2

@HeathWang Crash demo: HWPanModal Crash Demo. And I create a PR to fix this issue.

lchenfox avatar Jun 15 '22 14:06 lchenfox

HWPanModal (0.9.4) successfully published, fix this crash. If this crash exists again, pls reopen it. @devSC @yangjie2 @lchenfox @GandjaFuzz

HeathWang avatar Jun 16 '22 02:06 HeathWang

还是会崩

devSC avatar Mar 01 '23 10:03 devSC

还是会崩

堆栈信息有吗

HeathWang avatar Mar 02 '23 07:03 HeathWang

崩溃堆栈和上面一样的

devSC avatar Mar 03 '23 02:03 devSC