Post

Replies

Boosts

Views

Activity

Collection view bulk animation crash
Hi, we are experiencing an issue with the latest BETA of iOS 14 (BETA 2). In our app we make use of a collection view and perform animations to move/insert/delete cells int eh collection view. Since iOS 14 our app is experiencing severe crashes when performing such updates. Here is the relevant part of code: NSMutableArray<NSIndexPath *> *toInsert = [NSMutableArray new]; NSMutableArray<NSIndexPath *> *toRemove = [NSMutableArray new]; NSMutableArray<NSIndexPath *> *toMoveFrom = [NSMutableArray new]; NSMutableArray<NSIndexPath *> *toMoveTo = [NSMutableArray new]; /* FILL THE ARRAYS */ [self.collectionView performBatchUpdates:^{ /* <-- CRASH HERE */ 		if (toInsert.count > 0) 				[self.collectionView insertItemsAtIndexPaths:toInsert]; 		if (toRemove.count > 0) 				[self.collectionView deleteItemsAtIndexPaths:toRemove]; 		if (toMoveFrom.count > 0 && toMoveFrom.count == toMoveTo.count) { 				for (NSInteger i = 0; i < toMoveFrom.count; i++) { 						[self.collectionView moveItemAtIndexPath:toMoveFrom[i] toIndexPath:toMoveTo[i]]; 				} 		} } completion:nil]; And the crash: Crashed: com.apple.main-thread EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x00000008e70aa1b0 We monitor our crash reports with Firebase and it's reported that the crashes happen only on iOS 14 devices. We also received feedback from our BETA testers through TestFlight reporting the same issue. Any advice?
8
0
1.6k
Jul ’20