REFrostedViewController icon indicating copy to clipboard operation
REFrostedViewController copied to clipboard

EXC_BAD_ACCESS crash UINavigationController as ContentViewController

Open acajic opened this issue 11 years ago • 2 comments

UINavigationController *mainNC = [[UINavigationController alloc] init]; mainNC.viewControllers = @[someController];

I instantiate REFrostedViewController with mainNC as contentViewController property:

REFrostedViewController *reFrostedVC = [[REFrostedViewController alloc] init]; reFrostedVC.contentViewController = mainNC; reFrostedVC.menuViewController = ...;

Everything works fine.

Later I want to set mainNC's viewControllers to some other view controllers like this: mainNC.viewControllers = @[someOtherVC];

The app crashes with EXC_BAD_ACCESS error.

If I call: [mainNC pushViewController:someOtherVC animated:NO];

It works fine, but this is not what I want.

acajic avatar May 02 '14 09:05 acajic

OK, the problem has been encountered before, it is a iOS 7.1 thing:

  1. https://github.com/mwaterfall/MWPhotoBrowser/issues/121
  2. https://github.com/enormego/PhotoViewer/issues/33
  3. http://stackoverflow.com/questions/20251344/ios-crash-issue-exc-bad-access
  4. http://stackoverflow.com/questions/19183555/thread-1-exc-bad-access-code-1-address-0xf00000c

I managed to fix it by setting some scrollView's delegate to nil. Share your thoughts on this if you have something useful.

acajic avatar May 05 '14 13:05 acajic

The moment I inherit a protocol in Login in which I have import REfrostedViewController.The app crashes at

  • (id)init { self = [super init]; if (self) { [self commonInit]; } return self; } Thread 1: EXC_BAD_ACCESS (code=2, address=0x16ea0ffb0) What is the problem.I cant use protocol and delegates at this page at all.

In my App logs :libsystem_malloc.dylib`tiny_malloc_from_free_list:is showing

ANKITASRI04 avatar Jul 03 '18 10:07 ANKITASRI04