You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on a <TextInput multiline /> try to write several characters (number seems to ~100 - ~300) after you have enough characters in the buffer, try to delete a few of them, react-native will crash:
The problem was happening a lot more often with an older version, now it doesn't happen as often, but still occurs every once in a while, it might take a lot of typing/deleting to reproduce the problem
The text was updated successfully, but these errors were encountered:
…29307)
Summary:
Multiline `TextInput` can crash when really long texts are inserted and removed quickly. This is caused by the fact that [`-[NSAttributedString string]`](https://developer.apple.com/documentation/foundation/nsattributedstring/1412616-string?language=objc) doesn't really return a copy, and may mutate the string while it is being used by `convertIdToFollyDynamic`. See microsoft#489 (comment) for more details on the issue.
This issue was originally reported in microsoft#486 and was fixed in microsoft#489.
## Changelog
[iOS] [Fixed] - Fix multiline TextInput crash when inserting/removing lots of text
Pull Request resolved: #29307
Test Plan:
1. Open RNTester > TextInput
2. Search for a multiline example
3. Copy some large text and paste it into the text input view
4. Remove some (or all) text
5. Repeat steps 3-4
Reviewed By: shergin
Differential Revision: D22488854
Pulled By: JoshuaGross
fbshipit-source-id: 6fab7818d68538450d93460361ff5934caf86c10
Environment
"react-native-macos": "^0.61.54"
Issue
Steps to Reproduce
on a
<TextInput multiline />
try to write several characters (number seems to ~100 - ~300) after you have enough characters in the buffer, try to delete a few of them, react-native will crash:The problem was happening a lot more often with an older version, now it doesn't happen as often, but still occurs every once in a while, it might take a lot of typing/deleting to reproduce the problem
The text was updated successfully, but these errors were encountered: