-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Removed a wrong assert. #16170
Removed a wrong assert. #16170
Conversation
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.
Let's change it to RCTWarn and clarify the message?
Hey @shergin , I've updated the PR. I checked that I see the log message (and not a crash) in my sample app. FYI, there are several places in RCTUIManager.m with the same RCTAssert : I haven't touched them now, because I am not sure whether those are also bugs. My gut feeling is that most of those should be also only warnings. |
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.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I agree, it should be special internal method (something like |
Summary: This fixes [facebook#15801](facebook#15801) We ran into a strange crash on iOS (debug only). After removing the clutter I was able to reproduce it in a tiny app. You can check it out [here.](https://github.com/simonracz/textinput_stress) The UI in JS and native are not always in sync (which is okay). Due to this, a native view might call back into JS, which is no longer present in the shadow view hierarchy there. I think this should be also okay. TextInput in some cases calls into [setIntrinsicContentView](https://github.com/facebook/react-native/blob/6d67e2dbbcd658b7f845ebb0d0156bd64dc68226/React/Modules/RCTUIManager.m#L382), where it triggers an overly enthusiastic `NSAssert` and crashes the app. Check out [textinput_stress](https://github.com/simonracz/textinput_stress) Rotate the simulator a few times to see the crash or the lack of crash. Closes facebook#16170 Differential Revision: D5959776 Pulled By: shergin fbshipit-source-id: f39f5a3f1d86b330ecf7cbccd90871bc01fd69d9
Summary: This fixes [facebook#15801](facebook#15801) We ran into a strange crash on iOS (debug only). After removing the clutter I was able to reproduce it in a tiny app. You can check it out [here.](https://github.com/simonracz/textinput_stress) The UI in JS and native are not always in sync (which is okay). Due to this, a native view might call back into JS, which is no longer present in the shadow view hierarchy there. I think this should be also okay. TextInput in some cases calls into [setIntrinsicContentView](https://github.com/facebook/react-native/blob/6d67e2dbbcd658b7f845ebb0d0156bd64dc68226/React/Modules/RCTUIManager.m#L382), where it triggers an overly enthusiastic `NSAssert` and crashes the app. Check out [textinput_stress](https://github.com/simonracz/textinput_stress) Rotate the simulator a few times to see the crash or the lack of crash. Closes facebook#16170 Differential Revision: D5959776 Pulled By: shergin fbshipit-source-id: f39f5a3f1d86b330ecf7cbccd90871bc01fd69d9
This fixes #15801
We ran into a strange crash on iOS (debug only). After removing the clutter I was able to reproduce it in a tiny app. You can check it out here.
The UI in JS and native are not always in sync (which is okay). Due to this, a native view might call back into JS, which is no longer present in the shadow view hierarchy there. I think this should be also okay.
TextInput in some cases calls into setIntrinsicContentView, where it triggers an overly enthusiastic
NSAssert
and crashes the app.Test Plan
Check out textinput_stress
Rotate the simulator a few times to see the crash or the lack of crash.