fix: pager view recycling crash #970
Open
+44
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request resolves #946.
It's also related to #859, since the stacktrace is the same.
After 6.6.1 release, I was still facing this issue and getting regular errors in crashlytics from our users.
After some investigation, it turns out that we can reproduce this when nesting a react-navigation material top tabs navigator inside a native stack navigator (react-native-screens).
After deploying this as a patch via patch-package, the exception (which happened on a lot) went away completely with no visible side-effects. We've been monitoring the fixed version for a week now.
Test Plan
What's required for testing (prerequisites)?
react-native-pager-view nested in a stack.
What are the steps to reproduce (after prerequisites)?
Unfortunately, I can't reproduce consistently yet outside my project, and I can't share the code of my original project where this is happening.
Compatibility
Checklist
README.md