[BUG] Crash on Android when attemping to runOnJS or runAsync
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- android, javascript, react-native
- Área
- mobile
Línea de trabajo
Start by reproducing the provided runAsync and runOnJS frame-processor example on Android with the listed React Native, Vision Camera, and Worklets Core versions. Read the Android crash logs around ImageReader, ImageAnalysisAnalyzer, and the SIGSEGV in libjsc.so. Done means the same example no longer crashes the Android app or exhausts the ImageReader buffers.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hey there,
When attempting to use the following code:
const frameProcessor = useFrameProcessor(
frame => {
'worklet';
console.log('test');
runAsync(frame, () => {
'worklet';
console.log('test2');
});
},
[],
);
with @mrousavy react-vision-camera library the entire Android app crashes. on iOS is perfectly fine with no isses.
Logs:
2025-01-06 15:18:08.765 15044-15724 ImageReader_JNI com.swinghub.android W Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers
2025-01-06 15:18:08.766 15044-15724 ImageAnalysisAnalyzer com.swinghub.android E Failed to acquire image.
java.lang.IllegalStateException: maxImages (6) has already been acquired, call #close before acquiring more.
at android.media.ImageReader.acquireNextImage(ImageReader.java:513)
at androidx.camera.core.AndroidImageReaderProxy.acquireNextImage(AndroidImageReaderProxy.java:86)
at androidx.camera.core.SafeCloseImageReaderProxy.acquireNextImage(SafeCloseImageReaderProxy.java:86)
at androidx.camera.core.ImageAnalysisBlockingAnalyzer.acquireImage(ImageAnalysisBlockingAnalyzer.java:39)
at androidx.camera.core.ImageAnalysisAbstractAnalyzer.onImageAvailable(ImageAnalysisAbstractAnalyzer.java:126)
at androidx.camera.core.SafeCloseImageReaderProxy.lambda$setOnImageAvailableListener$1$androidx-camera-core-SafeCloseImageReaderProxy(SafeCloseImageReaderProxy.java:211)
at androidx.camera.core.SafeCloseImageReaderProxy$$ExternalSyntheticLambda0.onImageAvailable(D8$$SyntheticClass:0)
at androidx.camera.core.AndroidImageReaderProxy.lambda$setOnImageAvailableListener$0$androidx-camera-core-AndroidImageReaderProxy(AndroidImageReaderProxy.java:167)
at androidx.camera.core.AndroidImageReaderProxy$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:929)
2025-01-06 15:18:08.886 15044-15265 libc com.swinghub.android A Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x75d3cc2fb0 in tid 15265 (ionCamera.video), pid 15044 (winghub.android)
2025-01-06 15:18:08.938 15044-15667 CameraView com.swinghub.android I invokeOnAverageFpsChanged(NaN)
2025-01-06 15:18:09.106 15733-15733 DEBUG pid-15733 A pid: 15044, tid: 15265, name: ionCamera.video >>> com.swinghub.android <<<
2025-01-06 15:18:09.107 15733-15733 DEBUG pid-15733 A #05 pc 00000000003cd920 /data/app/com.swinghub.android-JILhOcVL9UeWxRMsrjHXNw==/base.apk!libjsc.so (offset 0x9720000) (BuildId: 9cb83e4124e3ee1471bc717c722b4109614385ba)
2025-01-06 15:18:09.107 15733-15733 DEBUG pid-15733 A #06 pc 00000000002622dc /data/app/com.swinghub.android-JILhOcVL9UeWxRMsrjHXNw==/base.apk!libjsc.so (offset 0x9720000) (JSStringCreateWithUTF8CString+20) (BuildId: 9cb83e4124e3ee1471bc717c722b4109614385ba)
---------------------------- PROCESS STARTED (15735) for package com.swinghub.android ----------------------------
Version:
"react-native": "0.76.5",
"react-native-vision-camera": "^4.6.3",
"react-native-vision-camera-face-detector": "^1.7.2",
"react-native-worklets-core": "^1.5.0",
Babel:
//['transform-remove-console'],
['react-native-worklets-core/plugin'],
[
'react-native-reanimated/plugin',
{
processNestedWorklets: true,
},
],
However did try babel without the core/plugin and kept re-animated but still an issue.
- 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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ros2/message_filters#338 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
subsurface/subsurface#4984 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
google-ai-edge/LiteRT-LM#3739 ·