"instanceHandle is null, event of type topSvgLayout will be dropped" logged repeatedly when SVG components are rapidly recycled in a FlatList

Author: lxr-mwhiteCreated Jul 10, 2026Updated Jul 10, 2026
LabelsRepro provided

Description

While stress-testing a FlatList with aggressive cell recycling (small windowSize/initialNumToRender, large programmatic jumps via scrollToIndex) where each cell renders an SVG icon (<Svg>/<Path>), we noticed the following line printed repeatedly and rapidly in the Xcode console:

UIManagerBinding.cpp:135] instanceHandle is null, event of type topSvgLayout will be dropped

We're not certain of the exact internal cause, but observationally:

  • It only appears when SVG components are being rapidly mounted/unmounted (e.g. via FlatList recycling with a very small windowSize).
  • It does not appear when scrolling manually at a normal pace - only when we force many mount/unmount cycles in quick succession (e.g. programmatically jumping between the first and last items of the list repeatedly).
  • Setting removeClippedSubviews on the FlatList appears to suppress the log entirely.
  • The event type reported is topSvgLayout, which corresponds to this library's internal onSvgLayout event.

We're filing this as an observation in case it's useful signal for something worth investigating on this library's side, separate from how other libraries (e.g. react-native-reanimated) consume this event. We don't have a confirmed root cause for why onSvgLayout ends up being associated with a component whose instance handle is already gone - just a reliable set of conditions under which the log appears.

Steps to reproduce

  1. Render a list (e.g. FlatList) where each item contains an SVG icon (e.g. a <Path> from react-native-svg).
  2. Configure the list for aggressive cell recycling with a small viewport window, e.g. windowSize={1}, initialNumToRender={1}, maxToRenderPerBatch={1}.
  3. Programmatically jump the visible window between distant indices (e.g. call scrollToIndex to jump from the first item straight to the last item, and back) repeatedly in a loop (e.g. every ~1000ms), instead of scrolling gradually.
  4. Watch the native console (Xcode) while this runs.
  5. After a short time, the following line appears repeatedly:
    UIManagerBinding.cpp:135] instanceHandle is null, event of type topSvgLayout will be dropped

Snack or a link to a repository

https://snack.expo.dev/@rca-mwhite/reanimated-svg-gettag-crash-repro

SVG version

15.15.5

React Native version

0.81.6

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

None

Device

Real device

Device model

No response

Acknowledgements

Yes

Source: software-mansion/react-native-svg