react-native-bottom-sheet-behavior icon indicating copy to clipboard operation
react-native-bottom-sheet-behavior copied to clipboard

Null pointer exception shouldInterceptTouchEvent

Open kristfal opened this issue 7 years ago • 3 comments

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 avatar Jul 17 '18 10:07 kristfal

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

kristfal avatar Jul 20 '18 10:07 kristfal

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.

cesardeazevedo avatar Jul 20 '18 12:07 cesardeazevedo

Hey,

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

kristfal avatar Jul 21 '18 20:07 kristfal