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

Worklets.createRunOnJS stop the app

Abierto
#207 8 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
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

Reproduce the freeze on the screen where the frame processor calls Worklets.createRunOnJS, and capture the Xcode errors. Then inspect that call, the frameProcessor entry point, and babel.config.js alongside the listed package versions. Done means identifying why the JS handoff freezes and verifying that both the frame-processor and button cases no longer hang.

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

Descripción

In my project, I use the frameProcessor from the react-native-vision-camera library. I have a code like this:

  const device = useCameraDevice('front');

  const {detectFaces} = useFaceDetector({
    classificationMode: 'all',
  });

  const handleDetectedFaces = Worklets.createRunOnJS(faces => {
    console.log('faces detected', faces);
  });

  const frameProcessor = useFrameProcessor(
    frame => {
      'worklet';
      const faces = detectFaces(frame);
      handleDetectedFaces(faces);
    },
    [],
  );

  return (
    <View style={{ flex: 1 }}>
      <Camera
        style={StyleSheet.absoluteFill}
        device={device}
        isActive={true}
        enableFpsGraph
        fps={15}
        videoHdr={false}
        frameProcessor={frameProcessor}
      />
    </View>
    )

When I launch the project and go to the screen where the function is called, the application immediately freezes and in xcode I get errors like in the screenshot below
Снимок экрана 2024-07-11 в 12 22 34

My package.json

"react": "^18.3.1",
"react-native": "^0.74.3",
"react-native-vision-camera": "^4.4.1",
"react-native-vision-camera-face-detector": "^1.7.0",
"react-native-worklets-core": "^1.3.3",

My babel.config.js

module.exports = {
  presets: ['module:@react-native/babel-preset', 'module:react-native-dotenv'],
  plugins: [
    [
      'react-native-reanimated/plugin',
      {
        processNestedWorklets: true,
      },
    ],
    ['react-native-worklets-core/plugin'],
  ],
};

Initially, I assumed that this was due to the fact that I transfer too often from the worklet stream to the js stream, however, I also tried to write just a functional where, at the click of a button, I would transfer information to the js stream once and the application still hung with the same errors in xcode. Has anyone faced similar problems and how did you solve them?

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.