Skip to content

Add ReactRootView in RelativeLayout will cause endless loop #25515

@codyi96

Description

@codyi96

I created a ReactRootView instance in this way and added it in a FrameLayout which wrapped by RelativeLayout.
Run the app, we can see the method called onMeasure in ReactRootView cause endless loop.
see DEMO

React Native version: 0.60.0

info Fetching system and libraries information...
System:
OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
Memory: 1.63 GB / 7.68 GB
Shell: 5.4.2 - /usr/bin/zsh
Binaries:
Node: 10.16.0 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 21, 22, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.2, 26.0.1, 26.0.2, 27.0.3, 28.0.3
Android NDK: 16.1.4479499
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. Download DEMO
  2. Run the app
  3. Set a breakpoint at ReactRootView.onMeasure
  4. The app stop at ReactRootView.onMeasure

Describe what you expected to happen:
The app is running.

Snack, code example, or link to a repository:
DEMO

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugPlatform: LinuxBuilding on Linux.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions