More than 1 modal opens fine. But upon closing, there's a native signal. Only happens during when DEBUG is on.
RNNRootViewController.m
-(void)cleanReactLeftovers {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self.view];
self.view = nil;
self.navigationItem.titleView = nil; // crashes
self.navigationItem.rightBarButtonItems = nil;
self.navigationItem.leftBarButtonItems = nil;
}
This seems to fix it:
-(void)cleanReactLeftovers {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[[NSNotificationCenter defaultCenter] removeObserver:self.view];
self.view = nil;
#if !DEBUG
self.navigationItem.titleView = nil;
self.navigationItem.rightBarButtonItems = nil;
self.navigationItem.leftBarButtonItems = nil;
#endif
}
Confirm that issue in our app.
It triggers EXC_BAD_ACCESS on the line with self.navigationItem.titleView = nil
That code is supposed to prevent potential leaks. Luckily I've only seen issues in DEBUG. Even though it's not the best solution but leaks are not as crucial in DEBUG.
Does that sound like an acceptable solution?
@chyrta for you also release works as expected and issue is only when in DEBUG?
Our team experienced a few critical issues after upgrading to 2.16.0 and 2.17.0. That's why we decided to stay on 2.11.0 with additional fixes in our fork and temporarily don't use 2.17.0 in our production.
Experiencing the same with 2.17.0
Hey guys, thanks for reporting. we're aware of a few crashes on iOS in version 2.17.0 and will address them next week. Sorry for the inconvenience.
We are encountering the same issue. Sometimes its working but mostly my app crashes in DEBUG mode.
Already fixed in master. will be available in the next version.
Available to test with the latest snapshot: 2.17.0-snapshot.282
Most helpful comment
Hey guys, thanks for reporting. we're aware of a few crashes on iOS in version 2.17.0 and will address them next week. Sorry for the inconvenience.