DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

Crash in dzn_original_implementation when working with PFQueryTableViewController (Parse)

Open UberJason opened this issue 8 years ago • 13 comments

Hi there,

I know this is random, but I'm getting a crash when working with a PFQueryTableViewController using the Parse SDK. Specifically, when I delete an object in the data set (through Parse) and call [self loadObjects], there's an exception on line 517:

screen shot 2015-08-25 at 10 09 20 pm

The exact error itself is "Assertion failure in -[UITableView _endCellAnimationsWithContext:]", and the exception stack shows that dzn_original_implementation is the second-to-last call before the crash:

screen shot 2015-08-25 at 10 07 48 pm

Any idea what's going on? I don't know enough about either the inner workings of Parse or DZNEmptyDataSet to track down what's going on. DZNEmptyDataSet and Parse have played together just fine elsewhere in my app, so I'm not sure what's different specifically here.

UberJason avatar Aug 26 '15 02:08 UberJason

wrong row count changement when you make cell animation such as insertion or deletion.

shayanbo avatar Sep 16 '15 07:09 shayanbo

I'm aware that this is commonly the problem, but it's not in this case. The error does not occur if I stop using DZNEmptyDataSet, and I've carefully checked that the row counts are correct. It looks more like something funny going on with the method swizzling.

UberJason avatar Sep 16 '15 13:09 UberJason

Method swizzling is so fragile. I Wish there was a better way of detecting reloadData.

dzenbot avatar Oct 22 '15 23:10 dzenbot

Im having the exact same issue. Anyone figure this out?

orinmurphy avatar Apr 20 '16 12:04 orinmurphy

Having this same issue in the same point within dzn_original_implementation, but it happens in UITableView endUpdates with this console message:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for rect of header in invalid section (1)'

It only seems to happen on iOS 8.2 or earlier (sim and device)--iOS 8.3 and up is fine. And it only happens after the app has been backgrounded and returns to a view where this tableView updating gets called. So it's likely just an iOS bug?

screenshot 2016-04-22 10 22 45

jstheoriginal avatar Apr 22 '16 15:04 jstheoriginal

I'm getting this on ios 9.3 UITableView endUpdates when working with Realm fine-grained notifications.

elprl avatar Jun 28 '16 20:06 elprl

Any update on this? I'm still seeing this crash on iOS 10.

chaseacton avatar Feb 21 '17 20:02 chaseacton

The same thing. Had to remove beginUpdates/endUpdates from the project.

kasyanov-ms avatar Feb 25 '17 12:02 kasyanov-ms

Any update on this issue?

poojaagarwal1331 avatar Sep 05 '17 13:09 poojaagarwal1331

We had to remove DZNEmptyDataSet from our project because of this bug. This is why you don't method swizzle.

chaseacton avatar Sep 05 '17 14:09 chaseacton

Any update on this? I'm seeing this crash on iOS 11.

romeugodoi avatar May 07 '18 14:05 romeugodoi

Any update on this?

wongzigii avatar Jun 01 '18 08:06 wongzigii

The crash you're seeing is likely nothing with the library, but the swizzled method hiding the true cause of the crash. If you set the tableView's emptyDataSource and emptyDelegate both to nil to disable using this library you should see what the true cause of the crash is.

The swizzling can hide the actual point in your code where the crash is occurring.

colinhumber avatar Jun 18 '18 21:06 colinhumber