romaonthego / REFrostedViewController

iOS 7/8 style blurred view controller that appears on top of your view controller.
MIT License
2.96k stars 494 forks source link

EXC_BAD_ACCESS crash UINavigationController as ContentViewController #85

Open acajic opened 10 years ago

acajic commented 10 years ago

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 commented 10 years ago

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.

ANKITASRI04 commented 6 years ago

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

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