Worklets.createRunOnJS stop the app
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native
- Ambito
- mobile-dev
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- C++
- Stelle
- 792
- Fork
- 65
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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 bundleAperta
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
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
ROCm/rocm-libraries#12703 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
isl-org/Open3D#7585 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
qbittorrent/qBittorrent#24975 ·
I maintainer di solito rispondono entro 3 giorni