Skip to content

Commit 53932d0

Browse files
Xin Chenfacebook-github-bot
authored andcommitted
Add extra logs to diagnose null view state issue
Summary: We still see crashes for T112157805 and this diff is to add missing information to help diagnose the issue better. We added a line of log to indicate which `mountItem` triggered the exception. Changelog: [Internal] Reviewed By: makovkastar Differential Revision: D42556576 fbshipit-source-id: 4283c34cb18d601ca7b80d3524c9c65cc4ae3f8a
1 parent ce75f89 commit 53932d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ private boolean dispatchMountItems() {
276276
// If there's an exception, we want to log diagnostics in prod and rethrow.
277277
FLog.e(TAG, "dispatchMountItems: caught exception, displaying mount state", e);
278278
for (MountItem m : mountItemsToDispatch) {
279+
if (m == mountItem) {
280+
// We want to mark the mount item that caused exception
281+
FLog.e(TAG, "dispatchMountItems: mountItem: next mountItem triggered exception!");
282+
}
279283
printMountItem(m, "dispatchMountItems: mountItem");
280284
}
281285
if (mountItem.getSurfaceId() != View.NO_ID) {

0 commit comments

Comments
 (0)