Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

SIGSEGV Error on production/compiled app when using `Worklets.createContext`

Abierto
#173 19 comentarios 1 reacción 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
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
javascript, react-native
Área
mobile-dev

Línea de trabajo

Start with the Worklets.createContext and createRunAsync entry points, then reproduce the SIGSEGV using the Index example and the release command npx expo run:android -d --variant release. Compare release behavior with dev mode and the older workaround; done means the reproduced app no longer crashes while running the context callback.

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

Descripción

This problem is related to this issue.

If I try to use runAsync method (wich uses Worklets.createContext method) my app crash while running compiled apk or running it in expo production mode (npx expo run:android -d --variant release).

In dev mode the app don't crash and everything works really fine.

With any version before 1.0.0-beta.3 (and also after a lot of tests) I came to the conclusion that the app don't crash and everything works fine (this was also my workaround to get my vision-camera's face-detector plugin working) if I create my context this way:

function useWorklet(
  func: () => void,
  dependencyList: DependencyList
): WorkletType {
  const worklet = React.useMemo( () => {
    // this was the trick
    const context: any = 'MyContext'
    return Worklets.createRunInContextFn( func, context )
  }, dependencyList )

  return worklet
}

const test = useWorklet() {
  'worklet'
  .... do anything
}

But after 1.0.0-beta.3 I can't do this workaround anymore as now we must call createRunAsync from a created context and this makes the app crash.

I'm currently using worklets core 1.1.1 version with vision camera 4.0.1 and this problem is still happening.

Here's a very simple reproducible code:

function Index() {
  const runOnJs = Worklets.createRunOnJS( () => {
    console.log( 'hello from js' )
  } )

  const context = Worklets.createContext( 'MyContext' )
  const runOnContext = context.createRunAsync( () => {
    'worklet'
    console.log( 'hello from context' )
    runOnJs()
  } )

  const frameProcessor = useFrameProcessor( ( frame ) => {
    'worklet'

    runOnContext()
  }, [] )

  return <Reanimated.View>
    <VisionCamera
      frameProcessor={ frameProcessor }
      pixelFormat='yuv'
      .... other vision camera props
    />
  </Reanimated.View>
}

Thanks for any help.

Lenguaje dominante
C++
Estrellas
791
Forks
65
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

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 margelo/react-native-worklets-core

Todos los issues de margelo/react-native-worklets-core

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.