Since the launch of iOS 9, crashalytics has reported a large number of crashes from NSInternalInconsistencyException: UICollectionView dataSource is not set , even when a data source is installed. It looks like it might be an SDK error, but I have no idea how to avoid it.
More details:
- This only happens on iOS 9. Hundreds of entries on iOS 9, zero on 7/8
- This happens in the main thread, deep in the UIKit code.
- I am setting a dataSource, but it looks like a UICollectionView is surviving a data source?
- There is no sequential playback, but this happens many times a day according to crashalytics.
Thread: Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x181a91900 __exceptionPreprocess
1 libobjc.A.dylib 0x1810fff80 objc_exception_throw
2 CoreFoundation 0x181a917d0 + [NSException raise: format:]
3 Foundation 0x18240499c - [NSAssertionHandler handleFailureInMethod: object: file: lineNumber: description:]
4 UIKit 0x1869152dc - [UICollectionView _createPreparedSupplementaryViewForElementOfKind: atIndexPath: withLayoutAttributes: applyAttributes:]
5 UIKit 0x1867e8990 - [UICollectionView _updateVisibleCellsNow:]
6 UIKit 0x1867e389c - [UICollectionView layoutSubviews]
source share