Closed
Description
One of our customers got this crash and it was reported to Instabug.
The crash occurred in IBGChatCollectionView (likely a chat interface) when the system was trying to update visible cells.
Expected dequeued view to be returned to the collection view in preparation for display
This means code called dequeueReusableCell to get a cell from the reuse pool, but then failed to actually use that cell in the collection view. Unfortunately no reproduction steps.
It was an iPhone 14 on iOS 18.5.
Libraries:
- "react-native": "^0.76.9",
- "instabug-reactnative": "13.4.0"
data:text/text;charset=utf-8,
# Cause: Expected dequeued view to be returned to the collection view in preparation for display. When the collection view's data source is asked to provide a view for a given index path, ensure that a single view is dequeued and returned to the collection view. Avoid dequeuing views without a request from the collection view. For retrieving an existing view in the collection view, use -[UICollectionView cellForItemAtIndexPath:] or -[UICollectionView supplementaryViewForElementKind:atIndexPath:]. Dequeued view: <IBGOutboundMessageActionCell: 0x11ce64000; baseClass = UICollectionViewCell; frame = (0 279; 390 231.934); layer = <CALayer: 0x10f833c60>>; Collection view: <IBGChatCollectionView: 0x10ce8c000; baseClass = UICollectionView; frame = (0 0; 390 643); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x115b02d30>; animations = { bounds.size=<CABasicAnimation: 0x11ced2220>; bounds.origin=<CABasicAnimation: 0x11ced2240>; }; backgroundColor = <UIDynamicProviderColor: 0x108aac320; provider = <__NSMallocBlock__: 0x11522e460>>; layer = <CALayer: 0x10ccade20>; contentOffset: {0, 141.66666666666666}; contentSize: {390, 784.734375}; adjustedContentInset: {0, 0, 0, 0}; layout: <IBGChatViewFlowLayout: 0x115913980>; dataSource: <IBGChatPresenter: 0x115b00e70>>
# Reported at: 2025-06-02 12:07:20 UTC
Thread 0 Queue 1: com.apple.main-thread (serial) [Crashed]:
0 CoreFoundation 0x1852fb21c __exceptionPreprocess + 164
1 libobjc.A.dylib 0x182795abc objc_exception_throw + 87
2 Foundation 0x1845f9670 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 287
3 UIKitCore 0x18852b8c8 _43-[UICollectionView _updateVisibleCellsNow:]_block_invoke.499 + 139
4 UIKitCore 0x187de70a4 -[_UICollectionViewSubviewManager removeAllDequeuedViewsWithEnumerator:] + 195
5 UIKitCore 0x187dec8a4 -[UICollectionView _updateVisibleCellsNow:] + 3831
6 UIKitCore 0x187d76590 -[UICollectionView layoutSubviews] + 279
7 UIKitCore 0x187af6070 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2439
8 QuartzCore 0x186d6dc14 CA::Layer::layout_if_needed(CA::Transaction*) + 487
9 QuartzCore 0x186d6d58c CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 155
10 QuartzCore 0x186d6f7f8 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 475
11 QuartzCore 0x186d6ecc0 CA::Transaction::commit() + 643
12 QuartzCore 0x186d6e938 CA::Transaction::flush_as_runloop_observer(bool) + 87
13 UIKitCore 0x187ad9e70 _UIApplicationFlushCATransaction + 51
14 UIKitCore 0x187ad9e0c __setupUpdateSequence_block_invoke_2 + 335
15 UIKitCore 0x187ad9404 _UIUpdateSequenceRun + 83
16 UIKitCore 0x187ad8ab4 schedulerStepScheduledMainSection + 207
17 UIKitCore 0x187ad41e4 runloopSourceCallback + 91
18 CoreFoundation 0x1851f0a8c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
19 CoreFoundation 0x1851f08a4 __CFRunLoopDoSource0 + 171
20 CoreFoundation 0x1851f0764 __CFRunLoopDoSources0 + 331
21 CoreFoundation 0x1851f1080 __CFRunLoopRun + 839
22 CoreFoundation 0x1851f2c3c CFRunLoopRunSpecific + 571
23 GraphicsServices 0x1d23d1454 GSEventRunModal + 167
24 UIKitCore 0x187c05274 -[UIApplication _run] + 815
25 UIKitCore 0x187bd0a28 UIApplicationMain + 335
26 ReimaWeather 0x104d08830 0x104d04000
Thread 1 com.apple.uikit.eventfetch-thread:
0 libsystem_kernel.dylib 0x1d63ffce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d64032b8 mach_msg_overwrite + 427
2 libsystem_kernel.dylib 0x1d6403100 mach_msg + 23
3 CoreFoundation 0x1851f2900 __CFRunLoopServiceMachPort + 159
4 CoreFoundation 0x1851f11f0 __CFRunLoopRun + 1207
5 CoreFoundation 0x1851f2c3c CFRunLoopRunSpecific + 571
6 Foundation 0x183e6a79c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211
7 Foundation 0x183e70020 -[NSRunLoop(NSRunLoop) runUntilDate:] + 63
8 UIKitCore 0x187bef56c -[UIEventFetcher threadMain] + 423
9 Foundation 0x183ed0804 __NSThread__start__ + 731
10 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
11 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 2 Unknown:
0 libsystem_kernel.dylib 0x1d63ffa90 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x20f900aac start_wqthread + 7
Thread 3 Unknown:
0 libsystem_kernel.dylib 0x1d63ffa90 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x20f900aac start_wqthread + 7
Thread 4 Unknown:
0 libsystem_kernel.dylib 0x1d63ffa90 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x20f900aac start_wqthread + 7
Thread 5 Unknown:
0 libsystem_kernel.dylib 0x1d63ffa90 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x20f900aac start_wqthread + 7
Thread 6 com.facebook.react.runtime.JavaScript:
0 libsystem_kernel.dylib 0x1d63ffce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d64032b8 mach_msg_overwrite + 427
2 libsystem_kernel.dylib 0x1d6403100 mach_msg + 23
3 CoreFoundation 0x1851f2900 __CFRunLoopServiceMachPort + 159
4 CoreFoundation 0x1851f11f0 __CFRunLoopRun + 1207
5 CoreFoundation 0x1851f2c3c CFRunLoopRunSpecific + 571
6 ReimaWeather 0x1051ea83c 0x104d04000
7 Foundation 0x183ed0804 __NSThread__start__ + 731
8 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
9 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 7 hades:
0 libsystem_kernel.dylib 0x1d6405438 __psynch_cvwait + 8
1 libc++.1.dylib 0x195ce52c4 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 31
2 hermes 0x1079a0df8 0x1078d4000
3 hermes 0x1079a0d60 0x1078d4000
4 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
5 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 8 hades:
0 libsystem_kernel.dylib 0x1d6405438 __psynch_cvwait + 8
1 libc++.1.dylib 0x195ce52c4 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 31
2 hermes 0x1079a0df8 0x1078d4000
3 hermes 0x1079a0d60 0x1078d4000
4 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
5 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 9 Unknown:
0 libsystem_kernel.dylib 0x1d63ffce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d64032b8 mach_msg_overwrite + 427
2 libsystem_kernel.dylib 0x1d6403100 mach_msg + 23
3 Instabug 0x10752bcbc exception_server_thread + 187
4 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
5 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 10 Unknown:
0 libsystem_kernel.dylib 0x1d63ffa90 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x20f900aac start_wqthread + 7
Thread 11 com.apple.NSURLConnectionLoader:
0 libsystem_kernel.dylib 0x1d63ffce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d64032b8 mach_msg_overwrite + 427
2 libsystem_kernel.dylib 0x1d6403100 mach_msg + 23
3 CoreFoundation 0x1851f2900 __CFRunLoopServiceMachPort + 159
4 CoreFoundation 0x1851f11f0 __CFRunLoopRun + 1207
5 CoreFoundation 0x1851f2c3c CFRunLoopRunSpecific + 571
6 CFNetwork 0x18681230c +[__CFN_CoreSchedulingSetRunnable _run:] + 415
7 Foundation 0x183ed0804 __NSThread__start__ + 731
8 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
9 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Thread 12 com.apple.CFStream.LegacyThread:
0 libsystem_kernel.dylib 0x1d63ffce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d64032b8 mach_msg_overwrite + 427
2 libsystem_kernel.dylib 0x1d6403100 mach_msg + 23
3 CoreFoundation 0x1851f2900 __CFRunLoopServiceMachPort + 159
4 CoreFoundation 0x1851f11f0 __CFRunLoopRun + 1207
5 CoreFoundation 0x1851f2c3c CFRunLoopRunSpecific + 571
6 CoreFoundation 0x1852ccf70 _legacyStreamRunLoop_workThread + 299
7 libsystem_pthread.dylib 0x20f903344 _pthread_start + 135
8 libsystem_pthread.dylib 0x20f900ab8 thread_start + 7
Binary Images:
0x1851e1000 CoreFoundation arm64e 7821F73C-378B-3A10-BE90-EF526B7DBA93
0x182764000 libobjc.A.dylib arm64e ED7C5FC7-DDC7-3424-9C44-DB56F51B8BE2
0x183e5b000 Foundation arm64e 34DE055D-8683-380A-9198-C3347211D13D
0x187ad0000 UIKitCore arm64e 96636F64-106F-30C8-A780-82DCEBB0F443
0x186d59000 QuartzCore arm64e 109010DA-3C35-3E22-B001-939786412EE2
0x1d23d0000 GraphicsServices arm64e 5BA62C22-6D37-3199-9DFD-0E0F7ABEBFA9
0x104d04000 ReimaWeather arm64e BD0C69D1-C77B-3F72-BA56-C0511B586970
0x1d63ff000 libsystem_kernel.dylib arm64e 9E195BE1-1733-345E-A9BF-50D0D7059647
0x20f900000 libsystem_pthread.dylib arm64e B37430D8-E3AF-33E4-81E1-FAED9EE26E8A
0x195cc4000 libc++.1.dylib arm64e D67033DD-2450-3CD8-B76C-AAC221A7FB80
0x1078d4000 hermes arm64e C44D5EEA-49FF-387A-B413-B31F880EC979
0x107138000 Instabug arm64e CE7A2469-28FB-38CD-B3EF-817954DA4416
0x186772000 CFNetwork arm64e A35A109C-49D2-3986-965D-4ED7E0B6681E