nxtbgthng / UITableView-NXEmptyView

An easy way to add empty views to your table view without subclassing anything
Other
205 stars 28 forks source link

Crash upon using UIImagePickerController #7

Open dschoeni opened 10 years ago

dschoeni commented 10 years ago

I get quite strange behaviour when using this in combination with a UIImagePickerController.

The whole thing sometimes (not all the time) crashes when using a UIImagePickerController.

- (void)nxEV_layoutSubviews;
{
    // this calls the original layoutSubviews implementation
    [self nxEV_layoutSubviews]; <-- EXC_BAD_ACCESS EXCEPTION
    [self nxEV_updateEmptyView];
}

It somehow crashes when calling upon the original implementation. Funnily enough, only for me on my iPod Testing Device, and it never happened in the wild yet. Doesn't make a difference whether I have the debugger attached or not. Someone got a clue?

stigi commented 10 years ago

We had an issue with a crashlog like this.

Turned out the crash was not really caused by NXEmptyView nor NXInfiniteScroll. The code (nx*_layoutSubviews) just did pop up in the stacktrace, but the app would have crashed anyway later due to inconsistency with sections and stuff.

If you can reproduce it, try and reproduce it without NXEmptyView (just return early in +[UITableView(NXEmptyView) load] to quickly enable/disable it).