Attempt to invoke virtual method 'android.view.ViewParent android.widget.LinearLayout.getParent()' on a null object reference
See original GitHub issue💻 My environment
- react-native-bootsplash version: 2.0.5
- react-native version: 0.61.5
- Platform: android
- OS version: 8 & 9
- Simulator: no
- Android buildToolsVersion: 28.0.3
🕵️♂️ Reproducing the issue
After upgrading to 2.x such a fatal error started to appear in our Sentry:
NullPointerException
Attempt to invoke virtual method 'android.view.ViewParent android.widget.LinearLayout.getParent()' on a null object reference
In the stack trace there are lots of repeated calls:
android.view.ViewGroup in findViewTraversal at line 4563
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
android.view.View in findViewById at line 22699
android.view.ViewGroup in findViewTraversal at line 4564
(...) etc
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Attempt to invoke virtual method 'int android.view.View ...
it sometimes occurs when we use a custom adapter in any activity of fragment . and we return null object i.e null view...
Read more >ViewParent - Android Developers
It is recommended you base your own implementation on the source code for the Android Open Source Project if you must use it...
Read more >[Resolved] attempt to invoke virtual method recyclerview ...
I wanted to search data from database to recycler view, my code is below but I get an error in line 20 please...
Read more >1410221 - Crash in java.lang.NullPointerException
NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.ViewGroup.getContext()' on a null object reference at ...
Read more >Android java.langNullPointerException null object reference
Attempt to invoke virtual method 'android.view.View android.widget.LinearLayout ... OnClickListener() { @Override public void onClick(View v) { LinearLayout ...
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 Free
Top 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
I’ve been trying to trigger a crash but with no luck, fortunately. So, big thanks!
@mefjuu I successfully reproduced it and it should be fixed in the latest version: https://github.com/zoontek/react-native-bootsplash/releases/tag/2.1.0
Could you try it? 🙏