-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
App crashes if changing the data of FlatList with renderItem TextInput quickly #15801
Comments
It seems that it will only crash with configuration |
We also ran into this issue last week. Pretty annoying bug. I am glad we are not the only ones. :) |
Summary: This fixes [#15801](#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 #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
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 issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
react-native -v
: 0.48.1node -v
: 8.4.0npm -v
: 5.3.0yarn --version
:Then, specify:
Steps to Reproduce
(Write your steps here:)
Expected Behavior
The app shouldn't crash.
If the render item of FlatList is another component like Text, it won't crash.
Actual Behavior
The app crash with log
Reproducible Demo
Could use this repo JenningsWu/FlatListOfTextInput to reproduce it.
It is interesting that I failed to reproduce the crash with expo Snack.
To reproduce, just run this repo with
react-native run-ios
or build with Xcode.The text was updated successfully, but these errors were encountered: