Android - App crashes with ReactRootView inside viewpager
See original GitHub issueIs this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Steps to Reproduce
(Write your steps here:)
- Create a native
ViewPager
with aReactRootView
as content, preferably with some images inside theReactRootView
- Swipe fast
- See this stack trace
Expected Behavior
I would expect no stack trace or errors to occur.
Actual Behavior
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.uimanager.ReactShadowNode.addChildAt(com.facebook.react.uimanager.ReactShadowNode, int)' on a null object reference
at com.facebook.react.uimanager.UIImplementation.setChildren(UIImplementation.java:472)
at com.facebook.react.uimanager.UIManagerModule.setChildren(UIManagerModule.java:436)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:374)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
at java.lang.Thread.run(Thread.java:818)
This occurs after swiping through the ViewPager quickly.
Reproducible Demo
Proposed fix: Below this line of code: Add the same fix as this one
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:7 (2 by maintainers)
Top Results From Across the Web
App Crashes on using Tab Views in Android - Stack Overflow
Add these lines to your activity's theme in styles.xml <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item>.
Read more >ViewPager NullPointerException when onPause is called from ...
I have tried all imposible solution but my app still crash...
Read more >Developers - V8 Runtime platform crash issue - - Bountysource
For Android,I embed V8 into ReactNative Sdk, And Found an issue. 1. Environment: ViewPager with Two Fragment:Fragment A & Fragment B, Every Fragment...
Read more >react-native | Yarn - Package Manager
5 vulnerabilities. A framework for building native apps using React ... React Native brings React's declarative UI framework to iOS and Android.
Read more >React Native March 2018 (v0.55.0) released
Android specific fixes. Fix: incorrect line-height calculation (74e54cb by @strindhaug); Fix crashes with TextInput introduced in 0.53 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
Think this issue is still relevant and even a fix is proposed. Is there anyone from the team that can apply this fix or confirm that this fix would be the right thing to do so someone else can create a PR?