-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Cannot remove child at index X from parent ViewGroup X, only X children in parent. Warning: childCount may be incorrect! #2491
Comments
@maciekBudzinski Thanks for reporting and providing a reproducible code! I opened a PR that aims to fix the problem. |
## Description This PR intents to fix going back on fabric issue when using a `View` with [removeClippedSubviews](https://reactnative.dev/docs/view#removeclippedsubviews) prop set to true. Previous bug fixes addressed this issue primarily for FlatLists, where it's set to true by default on Android. See #2383. Additionally, this PR greatly improves the performance of `startTransitionRecursive` as it does not climb up the tree in search for a parent with `removeClippedSubview` set to true anymore. Fixes #2491 . ## Changes - removed redundant code - updated `Test2282.tsx` repro <!-- ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ### After --> ## Test code and steps to reproduce - use `Test2282.tsx` repro ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <[email protected]>
@alduzy Hey! thank you for addressing this! I was wondering if that PR triggers a new release and if not, what version of the library should we get to have this fix you pushed? |
Hey, I'll release version on Monday / Tuesday at latest |
I just wanted to confirm that issue is resolved in v4.2.0. |
Thanks a lot @marcio-b! |
Thanks 🎉 |
Description
[Android Only] Application crashes when unmounting a screen with
removeClippedSubviews
set totrue
.Steps to reproduce
Run application from reproduction repository (
rnscreens
branch).Press login, then logout, see the application crash:
rnscreens_demo.webm
Snack or a link to a repository
https://github.com/maciekBudzinski/rnp-material-bottom-tabs-repro-issue/tree/rnscreens
Screens version
4.0.0
React Native version
0.76.1
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: