[BUG] Crash on Android when attemping to runOnJS or runAsync
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- android, javascript, react-native
- Ambito
- mobile
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 791
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di margelo/react-native-worklets-core
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
margelo/react-native-worklets-core#271 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#269 · 2 reazioni ·
-
Unable to download JS bundle Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
margelo/react-native-worklets-core#268 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
margelo/react-native-worklets-core#267 · 1 commento · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
margelo/react-native-worklets-core#266 · 1 commento · 2 reazioni ·
Tutte le issue di margelo/react-native-worklets-core
Issue simili
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Apertabug build
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Apertafuzz
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ClickHouse/ClickHouse#122114 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
module/agent platform/macos type/bug/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement PyCDE
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100