DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

Crashing while insert elements [[self tableView] endUpdates];

Open cbedoy opened this issue 8 years ago • 23 comments

I'm getting these error while insert elements on my tableView, it's happens while insert elements using the main_threed_queqe, but your library always crash on these method:

void dzn_original_implementation(id self, SEL _cmd){ Class baseClass = dzn_baseClassToSwizzleForTarget(self); NSString *key = dzn_implementationKey(baseClass, _cmd);

NSDictionary *swizzleInfo = [_impLookupTable objectForKey:key];
NSValue *impValue = [swizzleInfo valueForKey:DZNSwizzleInfoPointerKey];

IMP impPointer = [impValue pointerValue];

// We then inject the additional implementation for reloading the empty dataset
// Doing it before calling the original implementation does update the 'isEmptyDataSetVisible' flag on time.
[self dzn_reloadEmptyDataSet];

// If found, call original implementation
if (impPointer) {
    ((void(*)(id,SEL))impPointer)(self,_cmd);
}

}

cbedoy avatar Oct 18 '16 00:10 cbedoy

+1. Having the same issue with some users on Fabric. It's a rare one but it's out there.

alexbredy avatar Nov 07 '16 16:11 alexbredy

+1

BlessNeo avatar Nov 18 '16 08:11 BlessNeo

+1

eyalzohar avatar Nov 22 '16 18:11 eyalzohar

+1

4QStudios avatar Nov 29 '16 02:11 4QStudios

+1

hackjie avatar Dec 21 '16 03:12 hackjie

+1

ko7tya avatar Dec 23 '16 16:12 ko7tya

+1 @cbedoy will reload tableview entirely instead do insert get crash too? I got same issue and hard to reproduce and want to know if tableView reloadData can be a workaround

EthanChouTW avatar Jan 20 '17 02:01 EthanChouTW

+1

jerald-acacus avatar Apr 09 '17 05:04 jerald-acacus

+1

ces-annguyen avatar Apr 27 '17 09:04 ces-annguyen

+1

jelenadj avatar May 15 '17 21:05 jelenadj

Well the problem still happen sometimes, but I didn't find any solution :(

cbedoy avatar Jun 06 '17 23:06 cbedoy

Any update on this? Seems like a common issue. How are people solving it?

cerupcat avatar Aug 09 '17 19:08 cerupcat

Any update on this issue? Facing same.

poojaagarwal1331 avatar Sep 05 '17 13:09 poojaagarwal1331

I have the same problem just in iOS 9+ and I don't have it in iOS 10.

CoBug92 avatar Sep 27 '17 13:09 CoBug92

We're still having on.

cbedoy avatar Oct 27 '17 04:10 cbedoy

+1

sasquatchgit avatar Nov 29 '17 14:11 sasquatchgit

+1

crstian avatar Jan 23 '18 15:01 crstian

same issue

afriedmanGlacier avatar Apr 12 '18 17:04 afriedmanGlacier

+1. please help me, thank you everybody.

ToLengSon avatar Jun 01 '18 01:06 ToLengSon

For anyone still have this problem, I just solved this issue after hours investigation. The crash is not caused by this library actually. The crash is caused by a bug in iOS 10. And the bug has been fixed in iOS 10.3 and up. So no more crash for user with iOS 10.3 and up.

The REASON of the crash: If you are using UITableViewAutomaticDimension for your row height, and the height that returned in estimatedHeightForRowAt and heightForHeaderInSection methods are not precision, then calling method reloadData and endUpdates will leads an unexpected scrolling of your tableview, and this caused a shifting could either be up or down depends on the height you returned in estimatedHeightForRowAt and heightForHeaderInSection methods.

The SOLUTION: Instead of returning UITableViewAutomaticDimension or a random number in estimatedHeightForRowAt and heightForHeaderInSection methods, try to figure out a more precision height for your table view's row height and section header.

xuehaoze avatar Aug 01 '18 20:08 xuehaoze

For anyone still have this problem, I just solved this issue after hours investigation. The crash is not caused by this library actually. The crash is caused by a bug in iOS 10. And the bug has been fixed in iOS 10.3 and up. So no more crash for user with iOS 10.3 and up.

The REASON of the crash: If you are using UITableViewAutomaticDimension for your row height, and the height that returned in estimatedHeightForRowAt and heightForHeaderInSection methods are not precision, then calling method reloadData and endUpdates will leads an unexpected scrolling of your tableview, and this caused a shifting could either be up or down depends on the height you returned in estimatedHeightForRowAt and heightForHeaderInSection methods.

The SOLUTION: Instead of returning UITableViewAutomaticDimension or a random number in estimatedHeightForRowAt and heightForHeaderInSection methods, try to figure out a more precision height for your table view's row height and section header.

but I give a precision heigh and also crash with the same reason.My secreen is delete all datas and do this [self.tableView deleteRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationAutomatic];

Aaron0927 avatar Dec 07 '18 03:12 Aaron0927

For anyone still have this problem, I just solved this issue after hours investigation. The crash is not caused by this library actually. The crash is caused by a bug in iOS 10. And the bug has been fixed in iOS 10.3 and up. So no more crash for user with iOS 10.3 and up. The REASON of the crash: If you are using UITableViewAutomaticDimension for your row height, and the height that returned in estimatedHeightForRowAt and heightForHeaderInSection methods are not precision, then calling method reloadData and endUpdates will leads an unexpected scrolling of your tableview, and this caused a shifting could either be up or down depends on the height you returned in estimatedHeightForRowAt and heightForHeaderInSection methods. The SOLUTION: Instead of returning UITableViewAutomaticDimension or a random number in estimatedHeightForRowAt and heightForHeaderInSection methods, try to figure out a more precision height for your table view's row height and section header.

but I give a precision heigh and also crash with the same reason.My secreen is delete all datas and do this [self.tableView deleteRowAtIndexPath:indexPath withRowAnimation:UITableViewRowAnimationAutomatic];

Could you confirm if this crash happens in iOS 10.3 and up as well?

xuehaoze avatar Dec 11 '18 18:12 xuehaoze

I have the same problem on iOS 10.3.3

happyxb avatar Aug 26 '20 10:08 happyxb