Error: android_crash:java.lang.IllegalArgumentException:com.facebook.react.views.view.WindowUtilKt.s (#57056)#57056
Closed
alanleedev wants to merge 1 commit into
Closed
Error: android_crash:java.lang.IllegalArgumentException:com.facebook.react.views.view.WindowUtilKt.s (#57056)#57056alanleedev wants to merge 1 commit into
alanleedev wants to merge 1 commit into
Conversation
|
@alanleedev has exported this pull request. If you are a Meta employee, you can view the originating Diff in D106202618. |
cortinico
approved these changes
Jun 3, 2026
Contributor
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
alanleedev
added a commit
to alanleedev/react-native
that referenced
this pull request
Jun 3, 2026
…react.views.view.WindowUtilKt.s (facebook#57056) Summary: Fixed the crash (IllegalArgumentException: View not attached to window manager in `StatusBarModule`). The root cause is a lifecycle race condition where `StatusBarModule.setHidden()` and `setStyle()` post runnables to the UI thread that modify window attributes, but the activity can be destroyed before the runnable executes. Added `activity.isFinishing || activity.isDestroyed` guard checks inside both UI thread runnables in `StatusBarModule.kt` to prevent modifying window attributes on a destroyed activity. Changelog: [Android][Fixed] - Prevent `IllegalArgumentException` crash in `StatusBarModule` when activity is destroyed before the UI thread runnable executes Reviewed By: cortinico Differential Revision: D106202618
8e9f867 to
5676d65
Compare
alanleedev
added a commit
to alanleedev/react-native
that referenced
this pull request
Jun 3, 2026
…react.views.view.WindowUtilKt.s (facebook#57056) Summary: Fixed the crash (IllegalArgumentException: View not attached to window manager in `StatusBarModule`). The root cause is a lifecycle race condition where `StatusBarModule.setHidden()` and `setStyle()` post runnables to the UI thread that modify window attributes, but the activity can be destroyed before the runnable executes. Added `activity.isFinishing || activity.isDestroyed` guard checks inside both UI thread runnables in `StatusBarModule.kt` to prevent modifying window attributes on a destroyed activity. Changelog: [Android][Fixed] - Prevent `IllegalArgumentException` crash in `StatusBarModule` when activity is destroyed before the UI thread runnable executes Reviewed By: cortinico Differential Revision: D106202618
5676d65 to
a4b0885
Compare
alanleedev
added a commit
to alanleedev/react-native
that referenced
this pull request
Jun 3, 2026
…react.views.view.WindowUtilKt.s (facebook#57056) Summary: Pull Request resolved: facebook#57056 Fixed the crash (IllegalArgumentException: View not attached to window manager in `StatusBarModule`). The root cause is a lifecycle race condition where `StatusBarModule.setHidden()` and `setStyle()` post runnables to the UI thread that modify window attributes, but the activity can be destroyed before the runnable executes. Added `activity.isFinishing || activity.isDestroyed` guard checks inside both UI thread runnables in `StatusBarModule.kt` to prevent modifying window attributes on a destroyed activity. Changelog: [Android][Fixed] - Prevent `IllegalArgumentException` crash in `StatusBarModule` when activity is destroyed before the UI thread runnable executes Reviewed By: javache, cortinico Differential Revision: D106202618
a4b0885 to
a86d56a
Compare
…react.views.view.WindowUtilKt.s (facebook#57056) Summary: Fixed the crash (IllegalArgumentException: View not attached to window manager in `StatusBarModule`). The root cause is a lifecycle race condition where `StatusBarModule.setHidden()` and `setStyle()` post runnables to the UI thread that modify window attributes, but the activity can be destroyed before the runnable executes. Added `activity.isFinishing || activity.isDestroyed` guard checks inside both UI thread runnables in `StatusBarModule.kt` to prevent modifying window attributes on a destroyed activity. Changelog: [Android][Fixed] - Prevent `IllegalArgumentException` crash in `StatusBarModule` when activity is destroyed before the UI thread runnable executes Reviewed By: javache, cortinico Differential Revision: D106202618
a86d56a to
f156e3c
Compare
Collaborator
|
This pull request was successfully merged by @alanleedev in 732b848 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixed the crash (IllegalArgumentException: View not attached to window manager in
StatusBarModule). The root cause is a lifecycle race condition whereStatusBarModule.setHidden()andsetStyle()post runnables to the UI thread that modify window attributes, but the activity can be destroyed before the runnable executes. Addedactivity.isFinishing || activity.isDestroyedguard checks inside both UI thread runnables inStatusBarModule.ktto prevent modifying window attributes on a destroyed activity.Changelog: [Android][Fixed] - Prevent
IllegalArgumentExceptioncrash inStatusBarModulewhen activity is destroyed before the UI thread runnable executesReviewed By: javache, cortinico
Differential Revision: D106202618