Worklets.createRunOnJS stop the app
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
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
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de margelo/react-native-worklets-core
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
margelo/react-native-worklets-core#271 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#269 · 2 reacciones ·
-
Unable to download JS bundle Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
margelo/react-native-worklets-core#268 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
margelo/react-native-worklets-core#267 · 1 comentario · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
margelo/react-native-worklets-core#266 · 1 comentario · 2 reacciones ·
Todos los issues de margelo/react-native-worklets-core
Issues similares
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Abiertobug build
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Abiertofuzz
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
ClickHouse/ClickHouse#122114 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
module/agent platform/macos type/bug/regression
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement PyCDE
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100