We are using the latest The Zendesk Messaging SDK 2.36.0, and we see a lot of crashes per day. This is the highest crash in our app.
A few insights from Firebase to investigate the crash:
- The crash is happening in 95% on iOS 18, 3%-iOS 26.
- 0% on background
- in the previous SDK version, we saw this crash but the number of crashes was very low. But the number grew a lot in 2.36.0.
Crashed: com.apple.main-thread
0 ZendeskSDKMessaging 0x3d508 specialized LayoutModel.insertItem(_:at:) + 177 (LayoutModel.swift:177)
1 ZendeskSDKMessaging 0x32004 specialized StateController.process(changeItems:) + 777 (StateController.swift:777)
2 ZendeskSDKMessaging 0x36258 CollectionViewChatLayout.prepare(forCollectionViewUpdates:) + 758 (CollectionViewChatLayout.swift:758)
3 ZendeskSDKMessaging 0x371d0 @objc CollectionViewChatLayout.prepare(forCollectionViewUpdates:) + 79056 (<compiler-generated>:79056)
4 UIKitCore 0x311ef0 -[UICollectionViewLayout _prepareForCollectionViewUpdates:animated:] + 836
5 UIKitCore 0x311b80 -[UICollectionView _prepareLayoutForUpdates:] + 260
6 UIKitCore 0x3028fc -[UICollectionView _updateWithItems:tentativelyForReordering:propertyAnimator:collectionViewAnimator:] + 188
7 UIKitCore 0x30106c -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:] + 9180
8 UIKitCore 0x30cdc0 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:animationHandler:] + 416
9 ZendeskSDKMessaging 0x111d9c specialized UICollectionView.reload<A>(using:interrupt:onInterruptedReload:completion:setData:) + 54 (DifferenceKit+Extension.swift:54)
10 ZendeskSDKMessaging 0xf0404 closure #1 in closure #1 in ConversationViewController.safeUpdateCollectionView(with:completion:) + 381 (ConversationViewController.swift:381)
11 ZendeskSDKMessaging 0x9ef10 <deduplicated_symbol> + 10244
12 libdispatch.dylib 0x1aac _dispatch_call_block_and_release + 32
13 libdispatch.dylib 0x1b584 _dispatch_client_callout + 16
14 libdispatch.dylib 0x385c8 _dispatch_main_queue_drain.cold.5 + 812
15 libdispatch.dylib 0x10d30 _dispatch_main_queue_drain + 180
16 libdispatch.dylib 0x10c6c _dispatch_main_queue_callback_4CF + 44
17 CoreFoundation 0x6cb74 <redacted> + 16
18 CoreFoundation 0x102c4 <redacted> + 1980
19 CoreFoundation 0x11a0c CFRunLoopRunSpecific + 572
20 GraphicsServices 0x1454 GSEventRunModal + 168
21 UIKitCore 0x135274 -[UIApplication _run] + 816
22 UIKitCore 0x100a28 UIApplicationMain + 336
23 MainApp 0x40dc main + 7 (main.swift:7)
24 ??? 0x1ac371f08 (Missing)