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

Null pointer exception shouldInterceptTouchEvent #42

Open
kristfal opened this issue Jul 17, 2018 · 3 comments · May be fixed by #43
Open

Null pointer exception shouldInterceptTouchEvent #42

kristfal opened this issue Jul 17, 2018 · 3 comments · May be fixed by #43

Comments

@kristfal
Copy link

kristfal commented Jul 17, 2018

We’re seeing the following crashes in production.

It seems to be a race condition as it’s hitting across a wide range of OS versions and devices.

com.bottomsheetbehavior.RNBottomSheetBehavior.onInterceptTouchEvent
RNBottomSheetBehavior.java - line 247

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(android.view.MotionEvent)' on a null object reference

1
com.bottomsheetbehavior.RNBottomSheetBehavior.onInterceptTouchEvent RNBottomSheetBehavior.java:247
2
android.support.design.widget.CoordinatorLayout.resetTouchBehaviors CoordinatorLayout.java:394

(Pardon the poorly formatted code, posting from mobile)

Update: Just a FYI, we’re running on 27.0.2 support lib.

@kristfal
Copy link
Author

Looking at the code, this seems very similar to #40. I can open a PR with the same workaround here if needed.

@cesardeazevedo
Copy link
Owner

Awesome, if you fixed, and you haven't experienced any crashes, just send a pull request, i just haven't tried to to reproduce it yet, since it's hard to reproduce race conditions.

@kristfal
Copy link
Author

kristfal commented Jul 21, 2018

Hey,

We’ll put our fork in production this Tuesday Wednesday. I’ll open a PR when/if we see the issue fixed.

@kristfal kristfal linked a pull request Jul 23, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants