Log stack trace when unmountReactApplication is called in Fabric

Summary:
Sometimes stopSurface crashes when unmountReactApplication is called under Fabric; knowing the stack trace up to this point might assist in debugging.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D24532027

fbshipit-source-id: f350e77fb1a2de52eb146b449f1d2f6e960fa017
This commit is contained in:
Joshua Gross
2020-10-26 12:30:35 -07:00
committed by Facebook GitHub Bot
parent 6f78e16c01
commit 4b58038515
@@ -490,7 +490,11 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
UIManager uiManager =
UIManagerHelper.getUIManager(reactApplicationContext, getUIManagerType());
if (uiManager != null) {
FLog.e(TAG, "stopSurface for surfaceId: " + this.getId());
// TODO T48186892: remove when resolved
FLog.e(
TAG,
"stopSurface for surfaceId: " + this.getId(),
new RuntimeException("unmountReactApplication"));
if (getId() == NO_ID) {
ReactSoftException.logSoftException(
TAG,