Skip to content

Add Java assertions for order of Host/Instance inspector target teardown#44766

Closed
motiz88 wants to merge 1 commit into
facebook:mainfrom
motiz88:export-D58031217
Closed

Add Java assertions for order of Host/Instance inspector target teardown#44766
motiz88 wants to merge 1 commit into
facebook:mainfrom
motiz88:export-D58031217

Conversation

@motiz88
Copy link
Copy Markdown
Contributor

@motiz88 motiz88 commented Jun 3, 2024

Summary:
Changelog: [Internal]

There is currently a lifecycle bug in both the Bridge (com.facebook.react.bridge) and Bridgeless (com.facebook.react.runtime) integrations of Fusebox in React Native Android, whereby HostTarget::unregisterInstance gets called after the HostTarget has been destroyed. This manifests as a handful of related C++ crashes depending on the exact circumstances and build flags.

This diff makes the bug trigger a Java assertion instead of a C++ crash for ease of debugging. The next diff in the stack will actually fix the lifecycle issue.

Differential Revision: D58031217

Summary:
Changelog: [Internal]

There is currently a lifecycle bug in both the Bridge (`com.facebook.react.bridge`) and Bridgeless (`com.facebook.react.runtime`) integrations of Fusebox in React Native Android, whereby `HostTarget::unregisterInstance` gets called after the `HostTarget` has been destroyed. This manifests as a handful of related C++ crashes depending on the exact circumstances and build flags.

This diff makes the bug trigger a Java assertion instead of a C++ crash for ease of debugging. The next diff in the stack will actually fix the lifecycle issue.

Differential Revision: D58031217
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jun 3, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D58031217

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,576,605 +2
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,946,153 +2
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: a6a7cdf
Branch: main

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 6c2e1cf.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jun 4, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2024

This pull request was successfully merged by @motiz88 in 6c2e1cf.

When will my fix make it into a release? | How to file a pick request?

kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
…own (facebook#44766)

Summary:
Pull Request resolved: facebook#44766

Changelog: [Internal]

There is currently a lifecycle bug in both the Bridge (`com.facebook.react.bridge`) and Bridgeless (`com.facebook.react.runtime`) integrations of Fusebox in React Native Android, whereby `HostTarget::unregisterInstance` gets called after the `HostTarget` has been destroyed. This manifests as a handful of related C++ crashes depending on the exact circumstances and build flags.

This diff makes the bug trigger a Java assertion instead of a C++ crash for ease of debugging. The next diff in the stack will actually fix the lifecycle issue.

Reviewed By: hoxyq

Differential Revision: D58031217

fbshipit-source-id: 9301b34edf5e526cbc72d86e78b328d29c9921b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants