So I pushed an App update that uses the check above in layout subviews to block myself from accessing visibleCells during layoutSubviews (in my testing that wasn't showing to be occurring but since this crash is so rare I figured it might be the cause under some rare circumstances) so figured it was worth a shot. I've been using the app for two days now with the new update (quite a bit). I finally hit the crash again.
Crash reports show that my call to the visibleCells getter is that last part of my code being called. Then it goes to system code and then I crash (here's the call stack after I call the visibleCells getter)
0 CoreFoundation 0x19c789e48 __exceptionPreprocess + 164
1 libobjc.A.dylib 0x195a5b8d8 objc_exception_throw + 60
2 Foundation 0x19704a94c _userInfoForFileAndLine + 0
3 UIKitCore 0x19eaa0888 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 572
4 UIKitCore 0x19ea744cc -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 596
5 UIKitCore 0x19e9adb28 -[UITableView _updateVisibleCellsNow:] + 1088
6 UIKitCore 0x19e9785e8 -[UITableView _visibleCellsUsingPresentationValues:] + 340
Anyone at Apple know what exception is being thrown here down this code path (or possible exceptions, if more than one is possible)? That'd at least point me in some kind of direction as to what (if anything) I can do to avoid this. Thanks in advance.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: