-
-
Notifications
You must be signed in to change notification settings - Fork 630
[iOS][Fabric] Crash in YogaLayoutableShadowNode / RNSScreenShadowNode when visible content changes after closing overlay #3786
Copy link
Copy link
Open
Labels
close-when-staleThis issue is going to be closed when there is no activity for a whileThis issue is going to be closed when there is no activity for a whilemissing-infoThe user didn't precise the problem enoughThe user didn't precise the problem enoughmissing-reproThis issue need minimum repro scenarioThis issue need minimum repro scenarioplatform:iosIssue related to iOS part of the libraryIssue related to iOS part of the library
Description
Current behavior
On iOS with Fabric / New Architecture enabled, the app crashes with a native SIGABRT when a visible piece of UI inside a screen managed by react-native-screens re-renders after closing a custom overlay/dropdown.
The native crash consistently points to:
facebook::react::YogaLayoutableShadowNode::layout(...)facebook::react::RNSScreenShadowNode::layout(...)
This does not look like a JS exception or business-logic issue. It appears to be a native layout crash triggered by a dynamic content update inside a screen.
Reproduction pattern
I was able to isolate the behavior quite a bit:
- A single-select dropdown works fine.
- A multi-select dropdown closes fine as long as no visible trigger content changes afterwards.
- If the trigger button updates a visible count/text after closing the dropdown, the app crashes.
- If I only update invisible internal data, the app does not crash.
- If I move the count from local state to parent props, it still crashes.
- Even Fast Refresh / editing the button component can trigger the same crash if the visible content changes.
So the key trigger is not the selection logic itself, but a visible re-render/layout change of the trigger inside a screen tree after closing the dropdown.
Environment
- Expo:
55.0.6 - React Native:
0.83.2 - React:
19.2.0 - react-native-screens:
4.23.0 - Hermes: enabled
- Architecture: Fabric / New Architecture
- Platform: iOS Simulator
Crash stack
The crash consistently includes frames like:
facebook::react::YogaLayoutableShadowNode::layout(...)facebook::react::RNSScreenShadowNode::layout(...)facebook::react::UIManager::completeSurface(...)
Example:
Exception Type: EXC_CRASH (SIGABRT)
Triggered by Thread: com.facebook.react.runtime.JavaScript
facebook::react::YogaLayoutableShadowNode::layout(...)
facebook::react::RNSScreenShadowNode::layout(...) (RNSScreenShadowNode.cpp:122)
facebook::react::UIManager::completeSurface(...)
What I tested
I tried all of the following:
removing animations
using plain Text instead of animated text
delaying the state update
moving the state from local state to parent props
updating only internal item state
closing the dropdown without updating visible content
Result:
close() only: stable
visible content update after close: crash
local state vs props: same outcome
Why I think this belongs here
This seems very similar to other Fabric + iOS + react-native-screens dynamic layout issues, especially around re-renders and layout updates inside screen trees.
It feels like the trigger is:
close overlay/dropdown
visible content inside screen changes
Fabric layout commit runs
native crash in Yoga / RNSScreenShadowNode layout
Minimal conceptual repro
I don't have a public repro yet, but the minimal pattern is roughly:
screen managed by react-native-screens
custom overlay/dropdown rendered above screen content
closing overlay
immediately or shortly after, a visible child inside the trigger button changes text/count
native crash in YogaLayoutableShadowNode / RNSScreenShadowNode
If needed, I can try to build a reduced repro.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
close-when-staleThis issue is going to be closed when there is no activity for a whileThis issue is going to be closed when there is no activity for a whilemissing-infoThe user didn't precise the problem enoughThe user didn't precise the problem enoughmissing-reproThis issue need minimum repro scenarioThis issue need minimum repro scenarioplatform:iosIssue related to iOS part of the libraryIssue related to iOS part of the library