Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReactRootView in RelativeLayout will cause endless loop #25515

Closed
codyi96 opened this issue Jul 5, 2019 · 12 comments
Closed

Add ReactRootView in RelativeLayout will cause endless loop #25515

codyi96 opened this issue Jul 5, 2019 · 12 comments
Labels
Bug Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@codyi96
Copy link
Contributor

codyi96 commented Jul 5, 2019

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

@codyi96 codyi96 added the Bug label Jul 5, 2019
@codyi96
Copy link
Contributor Author

codyi96 commented Jul 5, 2019

There is a similar problem which is closed.
see #19403

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.60 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.

@codyi96
Copy link
Contributor Author

codyi96 commented Jul 11, 2019

Are you solving this problem?

@codyi96
Copy link
Contributor Author

codyi96 commented Jul 24, 2019

Anyone is dealing with this problem?

@codyi96
Copy link
Contributor Author

codyi96 commented Aug 8, 2019

This is a serious problem should be solved immediately i think. @cpojer

@codyi96
Copy link
Contributor Author

codyi96 commented Aug 15, 2019

Help!

@codyi96
Copy link
Contributor Author

codyi96 commented Aug 27, 2019

😢

1 similar comment
@codyi96
Copy link
Contributor Author

codyi96 commented Sep 5, 2019

😢

@SuddenH4X
Copy link

Maybe this will help somebody:

We've encountered a similiar issue, but we are using a FrameLayout wrapped by a ConstraintLayout. We fixed the problem by setting all four constraints to all layouts within the ConstraintLayout (even if not needed by Android): app:layout_constraintBottom_to..., app:layout_constraintEnd_to..., app:layout_constraintStart_to... and app:layout_constraintTop_to...

@codyi96
Copy link
Contributor Author

codyi96 commented Oct 30, 2019

Maybe this will help somebody:

We've encountered a similiar issue, but we are using a FrameLayout wrapped by a ConstraintLayout. We fixed the problem by setting all four constraints to all layouts within the ConstraintLayout (even if not needed by Android): app:layout_constraintBottom_to..., app:layout_constraintEnd_to..., app:layout_constraintStart_to... and app:layout_constraintTop_to...

I agree with u. This answer may be more detailed.

@stale
Copy link

stale bot commented Jan 28, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 28, 2020
@stale
Copy link

stale bot commented Feb 4, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Feb 4, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Feb 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants