DiffableDataSources
DiffableDataSources copied to clipboard
Crash on iOS 11
Checklist
- [x] This is not a Apple's bug.
- [x] Reviewed the README and documents.
- [x] Searched existing issues for ensure not duplicated.
My app crashes on iOS 11, works fine on iOS 12 and iOS 13.
I'm using IBPCollectionViewCompositionalLayout.
Detailed Description (Include Screenshots)
Stack Trace:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSDictionaryM setObject:forKey:]: key cannot be nil'
*** First throw call stack:
(
0 CoreFoundation 0x000000011c13e1e6 __exceptionPreprocess + 294
1 libobjc.A.dylib 0x000000011b7d3031 objc_exception_throw + 48
2 CoreFoundation 0x000000011c17e0bc _CFThrowFormattedException + 194
3 CoreFoundation 0x000000011c05172a -[__NSDictionaryM setObject:forKey:] + 1002
4 UIKit 0x0000000118990f07 -[UICollectionView _setVisibleView:forLayoutAttributes:] + 171
5 UIKit 0x00000001189a9dcb __71-[UICollectionView _updateWithItems:tentativelyForReordering:animator:]_block_invoke.1997 + 744
6 UIKit 0x0000000117f85537 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 560
7 UIKit 0x0000000117f85a0f +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 99
8 UIKit 0x00000001189a90f5 -[UICollectionView _updateWithItems:tentativelyForReordering:animator:] + 6349
9 UIKit 0x00000001189a2cc3 -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:] + 17420
10 UIKit 0x00000001189ab00e -[UICollectionView _endUpdatesWithInvalidationContext:tentativelyForReordering:animator:] + 71
11 UIKit 0x00000001189ab357 -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:] + 439
12 UIKit 0x00000001189ab17d -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:] + 91
13 UIKit 0x00000001189ab0ff -[UICollectionView _performBatchUpdates:completion:invalidationContext:] + 74
14 UIKit 0x00000001189ab054 -[UICollectionView performBatchUpdates:completion:] + 53
15 DifferenceKit 0x00000001139ef434 $sSo16UICollectionViewC13DifferenceKitE6reload5using9interrupt7setDatayAC15StagedChangesetVyxG_SbAC0K0VyxGcSgyxXEtSlRzlF + 3188
16 DiffableDataSources 0x000000011397a15a $s19DiffableDataSources014CollectionViewaB6SourceC5apply_20animatingDifferences10completionyAA0abF8SnapshotVyxq_G_SbyycSgtFySo012UICollectionE0C_13DifferenceKit15StagedChangesetVySayAA0K9StructureV7SectionVyxq__GGGyAUctcfU_ + 1066
17 DiffableDataSources 0x000000011397a1fa $s19DiffableDataSources014CollectionViewaB6SourceC5apply_20animatingDifferences10completionyAA0abF8SnapshotVyxq_G_SbyycSgtFySo012UICollectionE0C_13DifferenceKit15StagedChangesetVySayAA0K9StructureV7SectionVyxq__GGGyAUctcfU_TA + 58
18 DiffableDataSources 0x000000011397e4d9 $s19DiffableDataSources0aB10SourceCoreC5apply_4view20animatingDifferences14performUpdates10completionyAA0abD8SnapshotVyxq_G_qd__SgSbyqd___13DifferenceKit15StagedChangesetVySayAA0M9StructureV7SectionVyxq__GGGyAUctcyycSgtRld__ClFyycfU_0j7DiffingK0L_yySHRzSHR_Rld__Cr0__lF + 649
19 DiffableDataSources 0x000000011397e03a $s19DiffableDataSources0aB10SourceCoreC5apply_4view20animatingDifferences14performUpdates10completionyAA0abD8SnapshotVyxq_G_qd__SgSbyqd___13DifferenceKit15StagedChangesetVySayAA0M9StructureV7SectionVyxq__GGGyAUctcyycSgtRld__ClFyycfU_ + 1242
20 DiffableDataSources 0x000000011397e237 $s19DiffableDataSources0aB10SourceCoreC5apply_4view20animatingDifferences14performUpdates10completionyAA0abD8SnapshotVyxq_G_qd__SgSbyqd___13DifferenceKit15StagedChangesetVySayAA0M9StructureV7SectionVyxq__GGGyAUctcyycSgtRld__ClFyycfU_TA + 135
21 DiffableDataSources 0x0000000113982979 $s19DiffableDataSources26MainThreadSerialDispatcherC8dispatchyyyycF + 361
22 DiffableDataSources 0x000000011397dadf $s19DiffableDataSources0aB10SourceCoreC5apply_4view20animatingDifferences14performUpdates10completionyAA0abD8SnapshotVyxq_G_qd__SgSbyqd___13DifferenceKit15StagedChangesetVySayAA0M9StructureV7SectionVyxq__GGGyAUctcyycSgtRld__ClF + 623
23 DiffableDataSources 0x0000000113979cef $s19DiffableDataSources014CollectionViewaB6SourceC5apply_20animatingDifferences10completionyAA0abF8SnapshotVyxq_G_SbyycSgtF + 335
24 Stickers 0x000000010f1bc81c $s8Stickers21GalleryViewControllerC9refreshUIyyFy19DiffableDataSources0gH14SourceSnapshotVyAA7SectionCAA4CellCG_s5Error_pSgtcfU_ + 924
25 Stickers 0x000000010f2b56dd $s8Stickers11GalleryDataC4load10completionyy08DiffableC7Sources0fC14SourceSnapshotVyAA7SectionCAA4CellCG_s5Error_pSgtc_tFyycfU4_ + 205
26 Stickers 0x000000010f161860 $sIeg_IeyB_TR + 48
27 libdispatch.dylib 0x000000011d1c97ab _dispatch_call_block_and_release + 12
28 libdispatch.dylib 0x000000011d1ca7ec _dispatch_client_callout + 8
29 libdispatch.dylib 0x000000011d1d58cf _dispatch_main_queue_callback_4CF + 628
30 CoreFoundation 0x000000011c100c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
31 CoreFoundation 0x000000011c0c4ea6 __CFRunLoopRun + 2342
32 CoreFoundation 0x000000011c0c430b CFRunLoopRunSpecific + 635
33 GraphicsServices 0x000000011e2bda73 GSEventRunModal + 62
34 UIKit 0x0000000117ec3057 UIApplicationMain + 159
35 Stickers 0x000000010f28a5cb main + 75
36 libdyld.dylib 0x000000011d247955 start + 1
Reproducible Demo Project
Environments
- dependencies:
- DiffableDataSources (0.4.0):
- DifferenceKit/AppKitExtension (~> 1.1)
- DifferenceKit/UIKitExtension (~> 1.1)
- DifferenceKit/Core (1.1.5)
- DifferenceKit/UIKitExtension (1.1.5):
- DifferenceKit/Core
-
version: 0.4.0
-
Swift version: 5.0
-
iOS version: 11
-
Xcode version: 11.6
-
Devices/Simulators: Both
-
CocoaPods/Carthage version: cocoapods 1.9.3
i have the same problem. Is there a solution?