Totally stumped on this. When I dismiss my view controller which is being presented with a custom presentation/transition in iOS 8, I get a crash on private API with this error:
*** Assertion failure in -[UICollectionView dealloc], /SourceCache/UIKit/UIKit- 3318.16.21/UICollectionView.m:665
All I know is if I remove any of these:
[self.collectionView performBatchUpdates:^{
// append your data model to return a larger size for
// cell at this index path
} completion:nil];
then it doesn't crash.
But those methods ARE NOT being called on dealloc, dismiss, viewWillDisappear. Literally anything. It's like the invocations or messages are bing stuck in some dimension and called after the view is dismissed. But I can't log them and if I try to put in logic that prevents them being called in that case, it does nothing. Which kinda makes sense: they aren't actually BEING called.
UGH! Ideas?
Update:
I just got a crash with more info (tho still opaque)
malloc: *** mach_vm_map(size=2146844672) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Update 2:
I got it to stop crashing by wrapping some code in:
[self performAfterDelay:0 block:^{
//batch updates
}];