This repository was archived by the owner on Nov 14, 2025. It is now read-only.
[Android] Fix ConcurrentModificationException in InteropUIBlockListener#1
Draft
jkoutavas wants to merge 1 commit intorelease/0.79.2from
Draft
[Android] Fix ConcurrentModificationException in InteropUIBlockListener#1jkoutavas wants to merge 1 commit intorelease/0.79.2from
jkoutavas wants to merge 1 commit intorelease/0.79.2from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is in draft until we figure out what we want to do for a Test Plan
Summary:
This React Native Android fix hardens the Fabric
InteropUiBlockListeneragainstConcurrentModificationExceptioncrashes inwillMountItemsanddidMountItems. By iterating over a shallow copy of the UI‐block lists and catching any mid‐iteration mutations, we ensure the listener never throws during a UI frame and always clears its pending blocks.The issue was first reported in React Native Issue #49783, and although React Native PR#50091 was closed and not merged, the work in that PR did make it to React Native in commit 17da3cb. However, the fix didn't go far enough. We saw intermittent examples of this exception being thrown when swiping through a carousel from
react-native-reanimated-carousel. This fix goes right to the exception site itself.Changelog:
[ANDROID|INTERNAL] [FIXED] - Hardened the Fabric
InteropUiBlockListeneragainstConcurrentModificationExceptioncrashes inwillMountItemsanddidMountItemsTest Plan:
(TBD)