自动轮播会出现crash
Minozmin opened this issue · 7 comments
crash日志:
Exception Codes: 0x00000000 at 0x0000000000000000
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'attempt to scroll to invalid index path: <NSIndexPath: 0xd2747b4677318434> {length = 2, path = 0 - 6}'
//崩溃定位在这一句
-[ZKCycleScrollView automaticScroll] (ZKCycleScrollView.m (Line 207)) + 1576972
这是用crash日志捕获的
我也遇到了这个问题,希望能解决一下
2019-05-27 11:03:21.294792+0800 ZoomOnline[39279:11508040] The behavior of the UICollectionViewFlowLayout is not defined because:
2019-05-27 11:03:21.295001+0800 ZoomOnline[39279:11508040] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2019-05-27 11:03:21.295948+0800 ZoomOnline[39279:11508040] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x1072a1350>, and it is attached to <UICollectionView: 0x1080f4600; frame = (0 0; 375 510); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x282b93ea0>; layer = <CALayer: 0x2825629a0>; contentOffset: {0, -54}; contentSize: {375, 874}; adjustedContentInset: {54, 0, 0, 0}> collection view layout: <UICollectionViewFlowLayout: 0x1072a1350>.
2019-05-27 11:03:21.296675+0800 ZoomOnline[39279:11508040] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
crash日志:
Exception Codes: 0x00000000 at 0x0000000000000000
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'attempt to scroll to invalid index path: <NSIndexPath: 0xd2747b4677318434> {length = 2, path = 0 - 6}'//崩溃定位在这一句
-[ZKCycleScrollView automaticScroll] (ZKCycleScrollView.m (Line 207)) + 1576972这是用crash日志捕获的
感谢反馈,已修复
我也遇到了这个问题,希望能解决一下
2019-05-27 11:03:21.294792+0800 ZoomOnline[39279:11508040] The behavior of the UICollectionViewFlowLayout is not defined because:
2019-05-27 11:03:21.295001+0800 ZoomOnline[39279:11508040] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
2019-05-27 11:03:21.295948+0800 ZoomOnline[39279:11508040] The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x1072a1350>, and it is attached to <UICollectionView: 0x1080f4600; frame = (0 0; 375 510); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x282b93ea0>; layer = <CALayer: 0x2825629a0>; contentOffset: {0, -54}; contentSize: {375, 874}; adjustedContentInset: {54, 0, 0, 0}> collection view layout: <UICollectionViewFlowLayout: 0x1072a1350>.
2019-05-27 11:03:21.296675+0800 ZoomOnline[39279:11508040] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
感谢反馈,已修复
还有一个小问题
@Property (nonatomic, assign) NSTimeInterval autoScrollInterval;
//原代码setter方法的CGFloat
- (void)setAutoScrollInterval:(CGFloat)autoScrollInterval {}
//应改成NSTimeInterval - (void)setAutoScrollInterval:(NSTimeInterval)autoScrollInterval {}
还有一个小问题
@Property (nonatomic, assign) NSTimeInterval autoScrollInterval;//原代码setter方法的CGFloat
- (void)setAutoScrollInterval:(CGFloat)autoScrollInterval {}
//应改成NSTimeInterval- (void)setAutoScrollInterval:(NSTimeInterval)autoScrollInterval {}
已更正
Exception Codes: 0x00000000 at 0x00000006cebc84d0
Attempted to dereference garbage pointer 0x6cebc84d0.
-[ZKCycleScrollView collectionView:didSelectItemAtIndexPath:] (in Haoshiqi) (ZKCycleScrollView.m (Line 254)) + 1559264
这边发生了crash,但是我debug的时候没有复现
Exception Codes: 0x00000000 at 0x00000006cebc84d0
Attempted to dereference garbage pointer 0x6cebc84d0.-[ZKCycleScrollView collectionView:didSelectItemAtIndexPath:] (in Haoshiqi) (ZKCycleScrollView.m (Line 254)) + 1559264
这边发生了crash,但是我debug的时候没有复现
我这边没有复现这个bug,但根绝错误日志猜测可能是点击的时候计时器仍在运行引起的索引值错乱,最新代码已做了优化