I intermittently get Crashlytics
reports with the following error:
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000e
raw
libobjc.A.dylib
objc_msgSend + 5
1
UIKit
-[UICollectionViewUpdate _computeItemUpdates] + 1588
2
UIKit
-[UICollectionViewUpdate initWithCollectionView:updateItems:oldModel:newModel:oldVisibleBounds:newVisibleBounds:] + 254
3
UIKit
-[UICollectionView _endItemAnimations] + 6904
4
UIKit
-[UICollectionView performBatchUpdates:completion:] + 386
How can I debug this? The crash appears to be internal to a UICollectionView
. Does this mean the crash is internal to an Apple SDK?
You can add a symbolic breakpoint with -[UICollectionViewUpdate _computeItemUpdates]
as the value. Whenever that method is called, you'll be able to navigate the stack trace and (hopefully) see which line of your code is the last to be called before the crash.
The downside of this approach is you'll probably get a lot of pauses that are not followed by the crash, but it'll give you an idea of where it's coming from. Once you find the source of the crash in your code, unset the breakpoint and change a value or set something related to the cells until you can cause the crash to happen.
This is generally my approach to tracking down crashes from my crash reports from Flurry. Being you've ask this question half a year ago, if you found a solution to tracking down these types of bugs, I would appreciate it if you shared :)
User contributions licensed under CC BY-SA 3.0