Crash when dequeueReusableCellWithIdentifier, getting all properties nil after registerClass.

Hi all,

In iOS 10.0, using dequeueReusableCellWithIdentifier app gets crashes I also tried -forIndexPath method but same thing happened.

Now after researching I tried registerClass with what I have assigned in storyboard cell, this time the app did not crashed but all the property of cell returns nil.


When app crashes, using NSZombiesEnabled, it show me "An Objective-C message was sent to a deallocated 'CFString (immutable)' object (zombie) at address".


I take prototype cell in storyboard and assigned a custom class so there is no need to register class or nib in viewdidload.

Let me clear here is that it works fine prior to iOS 10.0 versions.

Please help me out of this issue.


Thanks,
Manish Patel

I've the same problem, please let me know if you got a solution way.

I'm seeing this as well in dequeueReusableCellWithIdentifier for a cell that I registed a nib for on the table view. I also am getting crashes when calling instantiateWithOwner on a UINib. It's all in code that was just fine when built on the iOS 9 SDK. Now, with iOS 10, it's crashing frequently.

My issue ended up being memory management. Some KVO that wasn't handled properly. If you're getting a bunch of random crashes, start tracking down memory leaks.

Thanks for your answer, I have resolved leaks but did not get result.

Here is my screenshot for crash. Can you please guild me what I am doing wrong

I have had the exactly same issue. Our crash now focus on iOS 10 on 32-bit devices like iPhone5 and iPhone 5c. Originally it crashes on 64-bit devices as well, changes the reuseIdentifier to a very short version seems to fix 64-bit devices.

Let me know if there's any fixes.

Had a similar crash with dequeueReusableCellWithIdentifier in iOS10 only.

In the nib file, I set the TableViewCell Identifier (in Attributes Inspector, 4th icon from the left) to be the same as the reuseId and that solved the crash.

I had the same problem.

In my case, I update the cell Identifier to lower than 10 characters, and the fix crash.

However, I was not possible to reproduce on new project that created by Xcode8.

Hey guys,

This was not the issue of ios 10 or xcode 8. This was crashed because of fault code written in the category of UITableView. So I removed this category and problem solved.


@implementation UITableViewCell (Shortcuts)

NSAPropertyRetainSetter(setReuseIdentifier, @"_reuseIdentifier")

+ (instancetype)cellWithStyle:(UITableViewCellStyle)style reuseIdentifier:(id)reuseIdentifier {

return [[[self alloc] initWithStyle:style reuseIdentifier:reuseIdentifier] autorelease];

}

- (UITableView *)tableView {

UIView *superview = self.superview;

if (![superview isKindOfClass:[UITableView class]]) { /

superview = superview.superview;

}

return (id)superview;

}

- (NSIndexPath *)indexPath {

return [self.tableView indexPathForCell:self];

}

@end


Please look into your code there might be some fault code regarding tableview cell or IBoutlet connection in Cells. Note: This is not an issue of memory leak.


Thanks for your support guys.

Crash when dequeueReusableCellWithIdentifier, getting all properties nil after registerClass.
 
 
Q