JS thread deadlocks in NativeEngine::SubmitCommands when an engine is disposed and a new one created quickly
@CedricGuillemet がすでに取り組んでいます。
2026年12月2日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 47/100
調査の方向性
Start in NativeEngine.cpp at SubmitCommands (around line 4005), then trace DeviceContext.cpp's AcquireFrameCompletionScope and the ReactNativeEngine.dispose/reset path described in the report. Reproduce by rapidly unmounting and remounting EngineView after its first frame, and inspect how asynchronous resetView interacts with rendering. Done means the new engine renders reliably after repeated quick remounts.
索引モデルが issue の本文から書いたものです。
説明
Environment: @babylonjs/react-native 2.0.7 (Babylon Native f4d9efb), React Native 0.81.6 (legacy architecture), Hermes, Xcode 27.1, iOS 27.0 Simulator (iPhone 17), macOS 27.0.1.
Steps
- A component calls
useEngine()and renders<EngineView camera={…} />with a non-trivial scene (shadows, glow,
GUI). - Unmount it and mount a fresh instance (new
useEngine(), newEngineView) several times in quick succession.
Re-mounting within about 1 s of the previous scene's first frame is enough.
Expected: the new engine renders.
Actual: the app freezes at 0% CPU. No crash report is written. The JS thread blocks forever:
Babylon::NativeEngine::SubmitCommands(Napi::CallbackInfo const&) NativeEngine.cpp:4005
Babylon::Graphics::DeviceContext::AcquireFrameCompletionScope() DeviceContext.cpp:67
Babylon::Graphics::FrameCompletionScope::FrameCompletionScope(DeviceImpl&) DeviceContext.cpp:47
Babylon::Graphics::DeviceImpl::IncrementPendingFrameScopes() DeviceImpl.cpp:525
std::condition_variable::wait(std::unique_lock<std::mutex>&)
This reproduces in both Debug and Release. Likely cause: ReactNativeEngine.dispose() → reset() →
BabylonModule.resetView() runs asynchronously, so it can land after the new view has re-enabled rendering. The new
engine then submits into a device that never starts another frame.
Workaround: keep one engine and one EngineView for the app lifetime and dispose only scenes. An extra scene with
autoClear = false keeps frames flowing when no "real" scene is shown.
- 主要言語
- C++
- スター
- 437
- フォーク
- 72
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BabylonJS/BabylonReactNative のほかの issue
-
Docs: New Architecture is not supported; GUI text needs a font対応中かも @CedricGuillemet が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
BabylonJS/BabylonReactNative#777 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
BabylonJS/BabylonReactNative#776 ·
-
Playground Metro fails to start: exclusionList is not a function対応中かも @CedricGuillemet が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
BabylonJS/BabylonReactNative#775 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
BabylonJS/BabylonReactNative#774 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
BabylonJS/BabylonReactNative#667 ·
BabylonJS/BabylonReactNative の issue をすべて見る
似ている issue
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itself対応中かも @fedonman が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
task
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
SparseLinearAlgebra/spla#316 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信