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
{{ message }}
Repository navigation
iOS Simulator: SIGSEGV in -[RiveFactory decodeImage:] when a RiveView with referenced image assets mounts again after the last RiveView unmounted #449
Versions: rive-react-native 9.8.6 (RiveRuntime 6.24.0), React Native 0.87, iOS Simulator on an Apple-silicon Mac. Not reproduced on a physical iPhone.
What happens: the app crashes natively (SIGSEGV) in -[RiveFactory decodeImage:], called from RiveReactNativeView.processAssetBytes, when a RiveView that supplies images through referencedAssets mounts again after every RiveView had been unmounted. The first mount always works.
Steps
Render a RiveView for a .riv with two referenced image assets, supplied as URLs via referencedAssets.
Unmount it so no RiveView is alive.
Mount a new RiveView for the same file and assets.
The app crashes while the asset bytes are processed. Intermittent: 4 of 5 automated runs.
What we think happens:RenderContextManager keeps its render contexts weakly ("when no more RiveRenderViews require these, they can be freed"), and RiveFactory holds a raw rive::Factory*. After the last view unmounts the context is freed, and decoding assets for the new view dereferences it.
Tried: decoding on the main thread (same crash, now on the main thread); dropping stale loads with a generation token (still crashes); holding a RiveFile reference (not reliable). RenderContextManager.shared().newDefaultContext() isn't callable from Swift because RenderContext is only forward-declared.
Now reproduced on a physical device as well (iPhone17,1, iOS 27.2, rive-react-native 9.8.6). Same trigger: a <Rive> view is unmounted and a new one mounted while referenced-asset image loads are in flight. Crash is EXC_BAD_ACCESS in -[RiveFactory decodeImage:] from RiveReactNativeView.processAssetBytes.
Activity
skontan commentedon Nov 10, 2026
Now reproduced on a physical device as well (iPhone17,1, iOS 27.2, rive-react-native 9.8.6). Same trigger: a
<Rive>view is unmounted and a new one mounted while referenced-asset image loads are in flight. Crash is EXC_BAD_ACCESS in-[RiveFactory decodeImage:]fromRiveReactNativeView.processAssetBytes.