iOS Simulator: SIGSEGV in -[RiveFactory decodeImage:] when a RiveView with referenced image assets mounts again after the last RiveView unmounted

Abierto
#449 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
43/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
ios, typescript
Área
mobile

Línea de trabajo

Start by tracing RiveReactNativeView.processAssetBytes, RiveFactory.decodeImage:, and RenderContextManager to understand how render contexts are retained across view unmounts. Reproduce the issue with the reported two-asset mount and unmount sequence in the iOS Simulator. Done when repeated remounts no longer crash while processing referenced image assets.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

  1. Render a RiveView for a .riv with two referenced image assets, supplied as URLs via referencedAssets.
  2. Unmount it so no RiveView is alive.
  3. Mount a new RiveView for the same file and assets.
  4. 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.

Lenguaje dominante
TypeScript
Estrellas
789
Forks
81
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rive-app/rive-react-native

Todos los issues de rive-app/rive-react-native

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.