Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Worklets.createRunOnJS stop the app

オープン
#207 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, react-native
領域
mobile-dev

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?

主要言語
C++
スター
791
フォーク
65
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

margelo/react-native-worklets-core のほかの issue

margelo/react-native-worklets-core の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。