-
-
Notifications
You must be signed in to change notification settings - Fork 605
Closed
Labels
Missing infoThe user didn't precise the problem enoughThe user didn't precise the problem enoughMissing reproThis issue need minimum repro scenarioThis issue need minimum repro scenarioPlatform: AndroidThis issue is specific to AndroidThis issue is specific to Android
Description
Description
App crashes with SIGABRT when pressing r for hot reload in development mode on Android with New Architecture enabled.
What happened
When hot reloading, the app crashes immediately with a JNI null pointer error.
What I expected
Hot reload should work without crashing.
Environment
- react-native: 0.83.0-rc.3 / 0.83.0-rc.5
- react-native-screens: 4.19.0-nightly-20251203
- Architecture: New Architecture (Fabric + Bridgeless)
- Platform: Android
Reproduction
- Create any app with
@react-navigation/native-stack - Enable New Architecture on Android
- Run the app in development mode
- Press
rto hot reload - App crashes
Crash Log
F libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE)
JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0x0
in call to GetObjectField
from void com.facebook.jni.HybridData$Destructor.deleteNative(long)
Stack Trace
#16 facebook::react::JFabricUIManager::getBinding()
#17 facebook::react::RNSScreenShadowNodeCommitHook::getUIManagerFromSharedContext
#18 facebook::react::RNSScreenShadowNodeCommitHook::~RNSScreenShadowNodeCommitHook
Root Cause
The bug was introduced in PR #3295 (commit 91b17d5).
The RNSScreenShadowNodeCommitHook destructor tries to call getUIManagerFromSharedContext() to unregister itself, but during hot reload, FabricUIManagerBinding is already destroyed, causing a null pointer access.
Suggested Fix
Don't unregister in the destructor since UIManager cleans up hooks automatically when destroyed.
I have a PR ready: #3475
Metadata
Metadata
Assignees
Labels
Missing infoThe user didn't precise the problem enoughThe user didn't precise the problem enoughMissing reproThis issue need minimum repro scenarioThis issue need minimum repro scenarioPlatform: AndroidThis issue is specific to AndroidThis issue is specific to Android