Skip to content

Conversation

dhvector
Copy link

I experienced this in a react-native app when using another library, LogRocket, which globally scans for text views to install their own text watcher for analytics purposes.

And along with react-native, I have these installed as well:

What triggers the crash is:

  1. when the React Native text component loops over an iterator
  2. this library's afterTextChanged is called which modifies the list while it's being iterated
  3. there are any other text watchers (e.g. LogRocket) that come after this one in the list.
  4. the iterator will try to fetch its next element, which fails with ConcurrentModificationException during the check for comodification.

If not for (3), the crash is avoided.

With this PR, I was able to substitute this library out for a patched one and confirmed it fixes the issue.

Let me know if you need anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant