fix(android): getChildDrawingOrder crash in react-native-screens ScreenStack#7368
fix(android): getChildDrawingOrder crash in react-native-screens ScreenStack#7368OtavioStasiak wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used🧠 Learnings (2)📚 Learning: 2026-02-05T13:55:00.974ZApplied to files:
📚 Learning: 2026-05-07T17:47:14.516ZApplied to files:
🔇 Additional comments (2)
WalkthroughThe ChangesDependency Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
Proposed changes
Fixes an intermittent Android crash during view draw/navigation:
The crash fires when Android validates child draw order during a frame draw
(getChildDrawingOrder()) and react-native-screens' ScreenStack returns a stale/out-of-range index.
It surfaces under fast native-stack transitions, especially around screens that use the native
Android RefreshControl.
Root cause
A known upstream race in react-native-screens ScreenStack draw ordering during native-stack
transitions on the new architecture. Reproduces most often when a native RefreshControl
(pull-to-refresh) is mounted on the screen being transitioned away from.
In our app the native RefreshControl is used on the highest-traffic navigation paths:
Combined with our deeply nested native stacks (MasterDetailStack, InsideStack, modals), this
matches the multiple ScreenStack.performDraw frames seen in the tombstone.
Upstream references:
The fix landed upstream in react-native-screens >= 4.17.x.
Changes
Upgrade react-native-screens from ~4.16.0 to ~4.17.1, the first release in our supported range
(Expo 54 / RN 0.81) that includes the upstream draw-order fix.
No application code changes were required — replacing the native RefreshControl with a JS/custom
implementation was held as a fallback and proved unnecessary.
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1191
How to test or reproduce
Stress loop (repeat ~30–50× on an Android device/emulator, release arm64):
adb logcat -d | rg "getChildDrawingOrder|ScreenStack.performDraw|FATAL EXCEPTION"
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
react-native-screenslibrary dependency from version 4.16.0 to 4.17.1. This routine maintenance update enhances native screen navigation performance across the application, improves overall platform stability and reliability on both iOS and Android devices, and incorporates recent bug fixes and compatibility enhancements from the upstream library.