New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ios): guard against nil proxy in TiViewController #11753
Conversation
Fix skipping async/await test
CI builds are running into hard crashes, typically on iPad but also on iPhone. Crash logs indicate underlying null pointer for _proxy. Fixes TIMOB-27930
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will have any effect on crash. Message passing on nil object is valid in Objective C.
e.g
id _proxy = nil;
BOOL isTrue = [_proxy conformsToProtocol:@protocol(TiWindowProtocol)]; will not crash and return 'false'.
I don't think the issue is that the _proxy is nil, it's that it's a reference to a deallocated proxy instance (i.e. a "zombie"). So I assume the nil check will guard against actually trying to call the conformsToProtocol message and avoid the crash. But the bigger issue is that we have a "zombie" pointer to a deallocated proxy instance still hung onto by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed, Unit test suite no longer crashes on iPad tests.
JIRA: https://jira.appcelerator.org/browse/TIMOB-27930
Description:
We're seeing crashes on the test suite in CI. Mainly on iPad runs, but also occasionally iPhone. The crash logs seem to indicate that
TiViewController
's underlying_proxy
field is nil. This PR simply guards for that case on all the delegate methods that access_proxy
(and effectively try to forward delegate method calls).Note that this should avoid the crash but there may be a deeper root cause that should be fixed as well. My best guess at this point is some odd edge case scenario with
Ti.UI.iOS.NavigationWindow
.