DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

crash msg:*** Assertion failure in -[UITableView _endCellAnimationsWithContext:],

Open IDwuqing opened this issue 6 years ago • 6 comments

the throw exception code is : // If found, call original implementation if (impPointer) { ((void(*)(id,SEL))impPointer)(self,_cmd); } sometimes crash I don't know why

IDwuqing avatar May 31 '19 07:05 IDwuqing

same crash

xyxsan avatar Jul 05 '19 09:07 xyxsan

I'm also facing this issue. In my case, I'm just reloading a cell like this:

DispatchQueue.main.async {
    self.tableView.beginUpdates()
    self.tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .none)
    self.tableView.endUpdates()
}

I'm doing this in the success case of an API call.

part of my crash log:

Last Exception Backtrace:
0   CoreFoundation                	0x18d66186c __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib               	0x1a25d0c50 objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreFoundation                	0x18d567000 +[NSException raise:format:arguments:] + 100 (NSException.m:146)
3   Foundation                    	0x18e8fb91c -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 132 (NSException.m:231)
4   UIKitCore                     	0x19020c7f8 -[UITableView _Bug_Detected_In_Client_Of_UITableView_Invalid_Number_Of_Sections:] + 132 (UITableView.m:2430)
5   UIKitCore                     	0x19020be90 -[UITableView _endCellAnimationsWithContext:] + 9620 (UITableView.m:2329)
6   UIKitCore                     	0x190224224 -[UITableView endUpdatesWithContext:] + 128 (UITableView.m:7694)
7   DZNEmptyDataSet               	0x100c4413c dzn_original_implementation + 172 (UIScrollView+EmptyDataSet.m:609)

alobaili avatar Jan 10 '21 07:01 alobaili

Is there a way to prevent this method swizzling from happening? I suspect it's somehow the cause of this crash.

alobaili avatar Jan 10 '21 08:01 alobaili

Update:

This crash happened during App Store review and resulted in rejecting my app.

I really hope it is investigated and fixed sooner than later.

alobaili avatar Jan 18 '21 19:01 alobaili

@alobaili you can always implement your own, or attempt to fix, or not use? Seriously.

https://github.com/dzenbot/DZNEmptyDataSet/blob/master/LICENSE#L9 == "Use at your own risk"

dzenbot avatar Jan 28 '21 07:01 dzenbot

@dzenbot I understand the risks. I just wanted to share my experience. Consider it feedback or bug report to help the creators investigate and improve.

Best,

alobaili avatar Jan 28 '21 08:01 alobaili