Nitro example run on Android crashed when tab to "View"
What's happening?
As title said, i just git clone repo to local, run on my physic Android phone to preview the example.
Reproduceable Code
no changes for repo
Relevant log output
...
Callback called!
Ref initialized!
Is View blue: false
ReactHost{0}.handleHostException(message = "bad_weak_ptr")
Exception in native call
com.facebook.jni.CppException: bad_weak_ptr
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
ReactHost{0}.getOrCreateDestroyTask()
ReactHost{0}.raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "bad_weak_ptr")
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "bad_weak_ptr")
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1025)
at com.facebook.react.runtime.ReactHostImpl.getOrCreateDestroyTask(ReactHostImpl.java:1651)
at com.facebook.react.runtime.ReactHostImpl.lambda$destroy$7(ReactHostImpl.java:615)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$uso21_D6dCZdcf-JomVD56kdG4c(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda35.call(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$2.run(Task.java:240)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1251)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:1012)
Caused by: com.facebook.jni.CppException: bad_weak_ptr
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
at java.lang.Thread.run(Thread.java:1012)
com.margelo.nitroexample, version: 1.0, Enable Prefetch: false
com.margelo.nitroexample/com.margelo.nitroexample.MainActivity use first frame acceleration
first vsync insert message into MessageQueue Head
Access denied finding property "vendor.gpp.create_frc_extension"
vri.reportNextDraw android.view.ViewRootImpl.performTraversals:4936 android.view.ViewRootImpl.doTraversal:3547 android.view.ViewRootImpl$TraversalRunnable.run:11558 android.view.Choreographer$CallbackRecord.run:1747 android.view.Choreographer$CallbackRecord.run:1756
vri.Setup new sync=wmsSync-VRI[MainActivity]#6
vri.reportDrawFinished
ReactHost{0}.getOrCreateDestroyTask(): Starting React Native destruction
ReactHost{0}.getOrCreateDestroyTask(): DevSupportManager cleanup
ReactHost{0}.getOrCreateDestroyTask(): Move ReactHost to onHostDestroy()
ReactContext.onHostPause()
ReactHost{0}.raiseSoftException(callWithExistingReactInstance(callFunctionOnModule("RCTDeviceEventEmitter", "emit"))): Execute: reactInstance is null. Dropping work.
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(callWithExistingReactInstance(callFunctionOnModule("RCTDeviceEventEmitter", "emit"))): Execute: reactInstance is null. Dropping work.
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1025)
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1018)
at com.facebook.react.runtime.ReactHostImpl.lambda$callWithExistingReactInstance$16(ReactHostImpl.java:1055)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$v_wsWn1AM15FUeMv5__nLvaLvTQ(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda18.then(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$7.run(Task.java:423)
at com.facebook.react.runtime.internal.bolts.Executors$ImmediateExecutor.execute(Executors.kt:41)
at com.facebook.react.runtime.internal.bolts.Task.completeImmediately(Task.java:418)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:288)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:299)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:354)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:346)
at com.facebook.react.runtime.internal.bolts.Task$8.run(Task.java:460)
at com.facebook.react.runtime.internal.bolts.Executors$ImmediateExecutor.execute(Executors.kt:41)
at com.facebook.react.runtime.internal.bolts.Task.completeAfterTask(Task.java:455)
at com.facebook.react.runtime.internal.bolts.Task.continueWithTask(Task.java:325)
at com.facebook.react.runtime.internal.bolts.Task.onSuccess(Task.java:345)
at com.facebook.react.runtime.ReactHostImpl.callWithExistingReactInstance(ReactHostImpl.java:1048)
at com.facebook.react.runtime.ReactHostImpl.callFunctionOnModule(ReactHostImpl.java:908)
at com.facebook.react.runtime.BridgelessReactContext.emitDeviceEvent(BridgelessReactContext.java:165)
at com.facebook.react.modules.appstate.AppStateModule.sendEvent(AppStateModule.kt:71)
at com.facebook.react.modules.appstate.AppStateModule.sendAppStateChangeEvent(AppStateModule.kt:75)
at com.facebook.react.modules.appstate.AppStateModule.onHostPause(AppStateModule.kt:48)
at com.facebook.react.bridge.ReactContext.onHostPause(ReactContext.java:302)
at com.facebook.react.runtime.ReactLifecycleStateManager.moveToOnHostDestroy(ReactLifecycleStateManager.java:82)
at com.facebook.react.runtime.ReactHostImpl.lambda$getOrCreateDestroyTask$36(ReactHostImpl.java:1699)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$lcqLDGefX1myvxiHdkL1sph7Yso(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda27.then(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$8.run(Task.java:460)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at android.app.ActivityThread.main(ActivityThread.java:9590)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
ReactContext.onHostDestroy()
Tried to remove non-existent frame callback
ReactHost{0}.getOrCreateDestroyTask(): Stopping all React Native surfaces
Stopping surface [11]
ReactHost{0}.raiseSoftException(callWithExistingReactInstance(callFunctionOnModule("RCTDeviceEventEmitter", "emit"))): Execute: reactInstance is null. Dropping work.
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(callWithExistingReactInstance(callFunctionOnModule("RCTDeviceEventEmitter", "emit"))): Execute: reactInstance is null. Dropping work.
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1025)
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1018)
at com.facebook.react.runtime.ReactHostImpl.lambda$callWithExistingReactInstance$16(ReactHostImpl.java:1055)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$v_wsWn1AM15FUeMv5__nLvaLvTQ(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda18.then(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$7.run(Task.java:423)
at com.facebook.react.runtime.internal.bolts.Executors$ImmediateExecutor.execute(Executors.kt:41)
at com.facebook.react.runtime.internal.bolts.Task.completeImmediately(Task.java:418)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:288)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:299)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:354)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:346)
at com.facebook.react.runtime.internal.bolts.Task$8.run(Task.java:460)
at com.facebook.react.runtime.internal.bolts.Executors$ImmediateExecutor.execute(Executors.kt:41)
at com.facebook.react.runtime.internal.bolts.Task.completeAfterTask(Task.java:455)
at com.facebook.react.runtime.internal.bolts.Task.continueWithTask(Task.java:325)
at com.facebook.react.runtime.internal.bolts.Task.onSuccess(Task.java:345)
at com.facebook.react.runtime.ReactHostImpl.callWithExistingReactInstance(ReactHostImpl.java:1048)
at com.facebook.react.runtime.ReactHostImpl.callFunctionOnModule(ReactHostImpl.java:908)
at com.facebook.react.runtime.BridgelessReactContext.emitDeviceEvent(BridgelessReactContext.java:165)
at com.facebook.react.modules.appstate.AppStateModule.sendEvent(AppStateModule.kt:71)
at com.facebook.react.modules.appstate.AppStateModule.onWindowFocusChange(AppStateModule.kt:57)
at com.facebook.react.bridge.ReactContext.onWindowFocusChange(ReactContext.java:360)
at com.facebook.react.runtime.ReactHostImpl.onWindowFocusChange(ReactHostImpl.java:788)
at com.facebook.react.ReactDelegate.onWindowFocusChanged(ReactDelegate.java:199)
at com.facebook.react.ReactActivityDelegate.onWindowFocusChanged(ReactActivityDelegate.java:207)
at com.facebook.react.ReactActivity.onWindowFocusChanged(ReactActivity.java:138)
at androidx.appcompat.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:125)
at com.android.internal.policy.DecorView.onWindowFocusChanged(DecorView.java:1930)
at android.view.View.dispatchWindowFocusChanged(View.java:16986)
at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1519)
at android.view.ViewRootImpl.dispatchFocusEvent(ViewRootImpl.java:5411)
at android.view.ViewRootImpl.handleWindowFocusChanged(ViewRootImpl.java:5315)
at android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged(Unknown Source:0)
at android.view.ViewRootImpl$ViewRootHandler.handleMessageImpl(ViewRootImpl.java:7764)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:7660)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:249)
at android.os.Looper.loop(Looper.java:337)
at android.app.ActivityThread.main(ActivityThread.java:9590)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Surface [11] was stopped on SurfaceMountingManager.
ReactHost{0}.getOrCreateDestroyTask(): Destroying MemoryPressureRouter
ReactHost{0}.getOrCreateDestroyTask(): Resetting ReactContext ref
ReactHost{0}.getOrCreateDestroyTask(): Destroying ReactContext
ReactHost{0}.getOrCreateDestroyTask(): Resetting ReactInstance ptr
ReactHost{0}.getOrCreateDestroyTask(): Destroying ReactInstance
Tried to remove non-existent frame callback
Scheduler::~Scheduler() was called (address: 0xb400006ff988b750).
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
refreshLastKeyboardType: 1
Destroying JSICache...
getCurrentKeyboardType: 1
UIManagerBinding::~UIManagerBinding() was called (address: 0xb400006ff9883ee8).
UIManager::~UIManager() was called (address: 0xb400006ec9876630).
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
onStartInput app:com.margelo.nitroexample restarting:false
Tried to enqueue runnable on already finished thread: 'v_native... dropping Runnable.
freeform resolution args raw data:{ "wide_default":{ "freeform_args": { "vertical_portrait":{"aspect_ratio":0.626, "original_ratio":0.5643,"original_scale":0.74,"top_margin":0.168,"left_margin":0.484}, "horizontal_portrait":{"aspect_ratio":0.626, "original_ratio":0.5643,"original_scale":0.74,"top_margin":0.1222,"left_margin":0.59745}, "vertical_landscape":{"aspect_ratio":1.6, "original_ratio":1,"original_scale":0.604,"top_margin":0.2596,"left_margin":0.2624}, "horizontal_landscape":{"aspect_ratio":1.6, "original_ratio":1,"original_scale":0.604,"top_margin":0.213,"left_margin":0.3758} }, "mini_freeform_args":{ "vertical_portrait":{"original_ratio":0.147}, "horizontal_portrait":{"original_ratio":0.147}, "vertical_landscape":{"original_ratio":0.165}, "horizontal_landscape":{"original_ratio":0.165} } }, "narrow_default": { "freeform_args": { "vertical_portrait":{"aspect_ratio":0.626, "original_ratio":1,"original_scale":0.74,"top_margin":0.0753,"left_margin":-1}, "horizontal_portrait":{"aspect_ratio":0.626, "original_ratio":1,"original_scale":0.5756,"top_margin":-1,"left_margin":0.0753}, "vertical_landscape":{"aspect_ratio":1.6, "original_ratio":0.6847,"original_scale":0.587,"top_margin":0.0753,"left_margin":-1}, "horizontal_landscape":{"aspect_ratio":1.6, "original_ratio":0.6847,"original_scale":0.587,"top_margin":-1,"left_margin":0.0753} }, "mini_freeform_args":{ "vertical_portrait":{"original_ratio":0.26}, "horizontal_portrait":{"original_ratio":0.26}, "vertical_landscape":{"original_ratio":0.293}, "horizontal_landscape":{"original_ratio":0.293} } }, "regular_default": { "freeform_args": { "vertical_portrait":{"aspect_ratio":0.625, "original_ratio":1,"original_scale":0.7,"top_margin":0.109,"left_margin":-1}, "horizontal_portrait":{"aspect_ratio":0.6667, "original_ratio":1,"original_scale":0.6102,"top_margin":-1,"left_margin":0.026}, "vertical_landscape":{"aspect_ratio":1.6, "original_ratio":1,"original_scale":0.4244,"top_margin":0.109,"left_margin":-1}, "horizontal_landscape":{"aspect_ratio":1.6, "original_ratio":1,"original_scale":0.4244,"top_margin":-1,"left_margin":0.026} }, "mini_freeform_args":{ "vertical_portrait":{"original_ratio":0.25}, "horizontal_portrait":{"original_ratio":0.25}, "vertical_landscape":{"original_ratio":0.25}, "horizontal_landscape":{"original_ratio":0.25} } }, "pad_default": { "freeform_args": { "vertical_portrait":{"aspect_ratio":0.5625, "original_ratio":0.375,"original_scale":0.835,"top_margin":0.049,"left_margin":0.2775}, "horizontal_portrait":{"aspect_ratio":0.5625, "original_ratio":0.375,"original_scale":0.835,"top_margin":-1,"left_margin":0.6525}, "vertical_landscape":{"aspect_ratio":-1, "original_ratio":1,"original_scale":0.468,"top_margin":0.049,"left_margin":-1}, "horizontal_landscape":{"aspect_ratio":-1, "original_ratio":1,"original_scale":0.468,"top_margin":-1,"left_margin":0.4976} }, "mini_freeform_args":{ "vertical_portrait":{"original_ratio":0.144}, "horizontal_portrait":{"original_ratio":0.144}, "vertical_landscape":{"original_ratio":0.2}, "horizontal_landscape":{"original_ratio":0.2} } }}
initFreeFormResolutionArgs failed, device is zorn
false
false
ReactHost{0}.getOrCreateDestroyTask(): Resetting start task ref
ReactHost{0}.getOrCreateDestroyTask(): Resetting destroy task ref
getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=9
mainTaskId=2710 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.margelo.nitroexample/com.margelo.nitroexample.MainActivity} }
mainTaskId=2680 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.android.settings/com.android.settings.MainSettings} }
mainTaskId=2705 userId=0 windowMode=1 baseIntent=Intent { act=android.settings.APPLICATION_DEVELOPMENT_SETTINGS flag=268468224 cmp=ComponentInfo{com.android.settings/com.android.settings.Settings$DevelopmentSettingsActivity} }
mainTaskId=2594 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=269484032 cmp=ComponentInfo{com.tencent.mm/com.tencent.mm.ui.LauncherUI} }
mainTaskId=2617 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.tencent.wework/com.tencent.wework.launch.LaunchSplashActivity} }
mainTaskId=2701 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity} }
mainTaskId=2700 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.VIEW flag=268435456 cmp=ComponentInfo{com.taobao.taobao/com.taobao.tao.welcome.Welcome} }
mainTaskId=2673 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270630912 cmp=ComponentInfo{com.eg.android.AlipayGphone/com.eg.android.AlipayGphone.AlipayLogin} }
mainTaskId=2663 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.baidu.BaiduMap/com.baidu.baidumaps.WelcomeScreen.Alias0} }
source = Task{1dd492f #2710 type=standard A=10331:com.margelo.nitroexample} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0xf48c88a miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0xf7f4c39
source = Task{1dd492f #2710 type=standard A=10331:com.margelo.nitroexample} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0xf48c88a miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0xf7f4c39
source = Task{1dd492f #2710 type=standard A=10331:com.margelo.nitroexample} excludeMiuiNavBar = true excludeMiuiStatusBar = true excludeIme = false excludeNavBar = true miuiNavSurfaceControl = Surface(name=Miui Fake NavBar#51)/@0xf48c88a miuiStatusSurfaceControl = Surface(name=Miui Fake StatusBar#50)/@0xf7f4c39
ReactHost{0}.onUserLeaveHint(activity)
ReactHost{0}.onHostPause(activity)
SettingTrigger : unregister status observer com.margelo.nitroexample.MainActivity
sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda12@1976bc6
visibilityChanged oldVisibility=true newVisibility=false
getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=9
mainTaskId=2710 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.margelo.nitroexample/com.margelo.nitroexample.MainActivity} }
mainTaskId=2680 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.android.settings/com.android.settings.MainSettings} }
mainTaskId=2705 userId=0 windowMode=1 baseIntent=Intent { act=android.settings.APPLICATION_DEVELOPMENT_SETTINGS flag=268468224 cmp=ComponentInfo{com.android.settings/com.android.settings.Settings$DevelopmentSettingsActivity} }
mainTaskId=2594 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=269484032 cmp=ComponentInfo{com.tencent.mm/com.tencent.mm.ui.LauncherUI} }
mainTaskId=2617 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.tencent.wework/com.tencent.wework.launch.LaunchSplashActivity} }
mainTaskId=2701 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity} }
mainTaskId=2700 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.VIEW flag=268435456 cmp=ComponentInfo{com.taobao.taobao/com.taobao.tao.welcome.Welcome} }
mainTaskId=2673 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270630912 cmp=ComponentInfo{com.eg.android.AlipayGphone/com.eg.android.AlipayGphone.AlipayLogin} }
mainTaskId=2663 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.baidu.BaiduMap/com.baidu.baidumaps.WelcomeScreen.Alias0} }
getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=9
mainTaskId=2710 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.margelo.nitroexample/com.margelo.nitroexample.MainActivity} }
mainTaskId=2680 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.android.settings/com.android.settings.MainSettings} }
mainTaskId=2705 userId=0 windowMode=1 baseIntent=Intent { act=android.settings.APPLICATION_DEVELOPMENT_SETTINGS flag=268468224 cmp=ComponentInfo{com.android.settings/com.android.settings.Settings$DevelopmentSettingsActivity} }
mainTaskId=2594 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=269484032 cmp=ComponentInfo{com.tencent.mm/com.tencent.mm.ui.LauncherUI} }
mainTaskId=2617 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.tencent.wework/com.tencent.wework.launch.LaunchSplashActivity} }
mainTaskId=2701 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity} }
mainTaskId=2700 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.VIEW flag=268435456 cmp=ComponentInfo{com.taobao.taobao/com.taobao.tao.welcome.Welcome} }
mainTaskId=2673 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270630912 cmp=ComponentInfo{com.eg.android.AlipayGphone/com.eg.android.AlipayGphone.AlipayLogin} }
mainTaskId=2663 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.baidu.BaiduMap/com.baidu.baidumaps.WelcomeScreen.Alias0} }
getRecentTasksForceIncludingTaskIdIfValid: getRecentTasks: size=9
mainTaskId=2710 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.margelo.nitroexample/com.margelo.nitroexample.MainActivity} }
mainTaskId=2680 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.android.settings/com.android.settings.MainSettings} }
mainTaskId=2705 userId=0 windowMode=1 baseIntent=Intent { act=android.settings.APPLICATION_DEVELOPMENT_SETTINGS flag=268468224 cmp=ComponentInfo{com.android.settings/com.android.settings.Settings$DevelopmentSettingsActivity} }
mainTaskId=2594 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=269484032 cmp=ComponentInfo{com.tencent.mm/com.tencent.mm.ui.LauncherUI} }
mainTaskId=2617 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.tencent.wework/com.tencent.wework.launch.LaunchSplashActivity} }
mainTaskId=2701 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.sankuai.meituan/com.meituan.android.pt.homepage.activity.MainActivity} }
mainTaskId=2700 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.VIEW flag=268435456 cmp=ComponentInfo{com.taobao.taobao/com.taobao.tao.welcome.Welcome} }
mainTaskId=2673 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270630912 cmp=ComponentInfo{com.eg.android.AlipayGphone/com.eg.android.AlipayGphone.AlipayLogin} }
mainTaskId=2663 userId=0 windowMode=1 baseIntent=Intent { act=android.intent.action.MAIN flag=270532608 cmp=ComponentInfo{com.baidu.BaiduMap/com.baidu.baidumaps.WelcomeScreen.Alias0} }
ReactHost{0}.stopSurface(surfaceId = 11): Schedule
ReactHost{0}.detachSurface(surfaceId = 11)
ReactHost{0}.onHostDestroy(activity)
ReactHost{0}.raiseSoftException(callWithExistingReactInstance(stopSurface(surfaceId = 11))): Execute: reactInstance is null. Dropping work.
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(callWithExistingReactInstance(stopSurface(surfaceId = 11))): Execute: reactInstance is null. Dropping work.
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1025)
at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.java:1018)
at com.facebook.react.runtime.ReactHostImpl.lambda$callWithExistingReactInstance$16(ReactHostImpl.java:1055)
at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$v_wsWn1AM15FUeMv5__nLvaLvTQ(Unknown Source:0)
at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda18.then(D8$$SyntheticClass:0)
at com.facebook.react.runtime.internal.bolts.Task$7.run(Task.java:423)
at com.facebook.react.runtime.internal.bolts.Executors$ImmediateExecutor.execute(Executors.kt:41)
at com.facebook.react.runtime.internal.bolts.Task.completeImmediately(Task.java:418)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:288)
at com.facebook.react.runtime.internal.bolts.Task.continueWith(Task.java:299)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:354)
at com.facebook.react.runtime.internal.bolts.Task$5.then(Task.java:346)
at com.facebook.react.runtime.internal.bolts.Task$8.run(Task.java:460)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1251)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:1012)
setAppInfoH atPid = 22091, gpuFname:com.margelo.nitroexample, gpuFver:10
---------------------------- PROCESS ENDED (22091) for package com.margelo.nitroexample ----------------------------
Device
Android 15(API 35)
Nitro Modules Version
0.25.2
Nitrogen Version
0.25.2
Can you reproduce this issue in the Nitro Example app here?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information
- [ ] I am using Expo
- [x] I am using Nitrogen (nitro-codegen)
- [x] I have read and followed the Troubleshooting Guide.
- [ ] I created a reproduction PR to reproduce this issue here in the nitro repo. (See Contributing for more information)
- [x] I searched for similar issues in this repository and found none.
my env checked by react-native doctor as below:
➜ example git:(main) bun run react-native doctor
Common
✓ Node.js - Required to execute JavaScript code
✓ yarn - Required to install NPM dependencies
✓ npm - Required to install NPM dependencies
✓ Watchman - Used for watching changes in the filesystem when in development mode
● Metro - Metro Bundler is not running
Android
✓ Adb - Required to verify if the android device is attached correctly
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✓ Android SDK - Required for building and installing your app on Android
iOS
✓ Xcode - Required for building and installing your app on iOS
✓ Ruby - Required for installing iOS dependencies
✓ CocoaPods - Required for installing iOS dependencies
✓ ios-deploy - Required for installing your app on a physical device with the CLI
✓ .xcode.env - File to customize Xcode environment
Errors: 0
Warnings: 1
Usage
› Press f to try to fix issues.
› Press e to try to fix errors.
› Press w to try to fix warnings.
› Press Enter to exit.
woah I haven't seen that before - don't know where a bad_weak_ptr can come from
can you run the app through Android Studio with a debugger attached to see where it exactly stops? I need a C++ stacktrace or line number to see where its coming from
can you run the app through Android Studio with a debugger attached to see where it exactly stops? I need a C++ stacktrace or line number to see where its coming from
I tried run debugger with global breakpoint, the crash stack as below with the snapshot:
Hm, I'm guessing this must be coming from hybridRef - specifically here, where we create a shared_ptr from the jni::global_ref: https://github.com/mrousavy/nitro/blob/6957f31e5f65594e6080f2bdb24a7d85ba5b0a2e/packages/react-native-nitro-image/nitrogen/generated/android/c%2B%2B/views/JHybridTestViewStateUpdater.cpp#L49-L50
Maybe shared_from_this() doesn't like being called from within different shared_ptrs ..?
Can you try if this fixes your issue? https://github.com/mrousavy/nitro/pull/632
Can you try if this fixes your issue? #632
Same as before with https://github.com/mrousavy/nitro/pull/632:
This was a hard one, but I think I finally fixed this in #803 :) pls lmk if this works