pujiaxin33 / JXSegmentedView

A powerful and easy to use segmented view (segmentedcontrol, pagingview, pagerview, pagecontrol, categoryview) (腾讯新闻、今日头条、QQ音乐、网易云音乐、京东、爱奇艺、腾讯视频、淘宝、天猫、简书、微博等所有主流APP分类切换滚动视图)
MIT License
2.68k stars 369 forks source link

iOS15系统上,滚动会崩溃 #187

Closed gorvell closed 1 month ago

gorvell commented 2 years ago

Last Exception Backtrace: 0 CoreFoundation 0x18147805c __exceptionPreprocess + 220 1 libobjc.A.dylib 0x199992f54 objc_exception_throw + 59 2 CoreAutoLayout 0x199c857f0 _AssertAutoLayoutOnAllowedThreadsOnly + 415 3 CoreAutoLayout 0x199c8a97c -[NSISEngine _optimizeWithoutRebuilding] + 71 4 CoreAutoLayout 0x199c8ca58 -[NSISEngine optimize] + 107 5 CoreAutoLayout 0x199c8513c -[NSISEngine performPendingChangeNotifications] + 115 6 UIKitCore 0x183bde980 -[UIView+ 3496320 (Hierarchy) layoutSubviews] + 499 7 UIKitCore 0x183a25d40 -[UIScrollView layoutSubviews] + 87 8 UIKitCore 0x183a04320 -[UICollectionView layoutSubviews] + 63 9 UIKitCore 0x183a16cc8 -[UIView+ 1629384 (CALayerDelegate) layoutSublayersOfLayer:] + 2619 10 QuartzCore 0x185170280 CA::Layer::layout_if_needed+ 258688 (CA::Transaction) + 535 11 QuartzCore 0x185162aa8 CA::Layer::layout_and_display_if_needed+ 203432 (CA::Transaction) + 143 12 QuartzCore 0x1851770b0 CA::Context::commit_transaction+ 286896 (CA::Transaction, double, double) + 499 13 QuartzCore 0x185180174 CA::Transaction::commit+ 323956 () + 679 14 QuartzCore 0x1851d7d38 CA::Transaction::release_thread+ 683320 (void*) + 227 15 libsystem_pthread.dylib 0x1f18b5f0c _pthread_tsd_cleanup + 523 16 libsystem_pthread.dylib 0x1f18b8904 _pthread_exit + 83 17 libsystem_pthread.dylib 0x1f18b5498 _pthread_wqthread_exit + 79 18 libsystem_pthread.dylib 0x1f18b5238 _pthread_wqthread + 423 19 libsystem_pthread.dylib 0x1f18b4f50 start_wqthread + 7

pujiaxin33 commented 2 years ago

是demo就能出现的吗?有没有具体操作呢?手机是什么型号呢?

KFEnzo commented 2 years ago

CrashDoctor Diagnosis: Application threw exception NSInternalInconsistencyException: the cell returned from -collectionView:cellForItemAtIndexPath: does not have a reuseIdentifier - cells must be retrieved by calling -dequeueReusableCellWithReuseIdentifier:forIndexPath: Thread 0 Crashed: 0 CoreFoundation 0x0000000188111288 __exceptionPreprocess 1 libobjc.A.dylib 0x00000001a0e0b744 objc_exception_throw 2 Foundation 0x000000018999e360 _userInfoForFileAndLine 3 UIKitCore 0x000000018a81d3d8 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] 4 UIKitCore 0x000000018a717308 -[UICollectionView _updateVisibleCellsNow:] 5 UIKitCore 0x000000018a66ba84 -[UICollectionView layoutSubviews] 6 bookclub 0x0000000103b584d0 JXSegmentedCollectionView.layoutSubviews() + [JXSegmentedCollectionView.swift : 26] 7 bookclub 0x0000000103b585c0 @objc JXSegmentedCollectionView.layoutSubviews() + [ : 0] 8 UIKitCore 0x000000018a67dfb4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 9 QuartzCore 0x000000018bdf4cd0 CA::Layer::layout_if_needed(CA::Transaction) 10 QuartzCore 0x000000018bde7134 CA::Layer::layout_and_display_if_needed(CA::Transaction) 11 QuartzCore 0x000000018bdfba7c CA::Context::commit_transaction(CA::Transaction, double, double) 12 QuartzCore 0x000000018be04970 CA::Transaction::commit() 13 UIKitCore 0x000000018aa301b4 _UIApplicationFlushCATransaction 14 UIKitCore 0x000000018acca97c _UIUpdateSequenceRun 15 UIKitCore 0x000000018b350c48 schedulerStepScheduledMainSection

WuTengWei commented 2 years ago

NSInternalInconsistencyException the cell returned from -collectionView:cellForItemAtIndexPath: does not have a reuseIdentifier - cells must be retrieved by calling -dequeueReusableCellWithReuseIdentifier:forIndexPath:

CoreFoundation ___exceptionPreprocess + 228 6 UIKitCore -[UICollectionView layoutSubviews] + 324 7 xxxxxx layoutSubviews (JXSegmentedCollectionView.swift:29) 8 xxxxxx layoutSubviews (:0) 9 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1292 22 UIKitCore _UIApplicationMain + 212 23 xxxxxx main (AppDelegate.swift:27) 24 libdyld.dylib _start + 4

pujiaxin33 commented 1 month ago

已修复