Thursday, October 29, 2026
HomeiOS Developmentios - Sudden crash in CollectionView

ios – Sudden crash in CollectionView

[ad_1]

I discovered a crashed on crashlytics that comes from customers however is just not reproducible at my finish.

The initiatives makes use of collectionviews at a number of locations and I’ve even verified the cell class being set appropriately in storyboard.

Deadly Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x91d3c __exceptionPreprocess
1  libobjc.A.dylib                0x146a8 objc_exception_throw
2  Basis                     0x1229ac _userInfoForFileAndLine
3  UIKitCore                      0x312298 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:]
4  UIKitCore                      0x500d4c -[UICollectionView _prefetchItemsForPrefetchingContext:]
5  UIKitCore                      0x169994 -[UICollectionView _updatePrefetchedCells:]
6  UIKitCore                      0x303218 -[UICollectionView _updateCycleIdleUntil:]
7  UIKitCore                      0x17f8ec ___UIUpdateCycleNotifyIdle_block_invoke
8  libdispatch.dylib              0x631a4 _dispatch_call_block_and_release
9  libdispatch.dylib              0x641a8 _dispatch_client_callout
10 libdispatch.dylib              0x454b8 _dispatch_main_queue_callback_4CF$VARIANT$armv81
11 CoreFoundation                 0x4d888 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
12 CoreFoundation                 0xb188 __CFRunLoopRun
13 CoreFoundation                 0x1de1c CFRunLoopRunSpecific
14 GraphicsServices               0x19a0 GSEventRunModal
15 UIKitCore                      0x4ebb90 -[UIApplication _run]
16 UIKitCore                      0x28116c UIApplicationMain
17 Ticket                         0x7d80 fundamental + 23 (AppDelegate.swift:23)
18 ???                            0x100ba4250 (Lacking)

The code for cellForItemAt

if let cell = collectionView.dequeueReusableCell(withReuseIdentifier: MyCollectionViewCell.identifier, for: indexPath) as? MyCollectionViewCell{
//Some Codes
    return cell
}
return UICollectionViewCell()

I can not perceive why that is occurring.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments