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

Crashes on InterceptTouchEvent #15

Open
arifurrhman opened this issue Nov 14, 2018 · 4 comments
Open

Crashes on InterceptTouchEvent #15

arifurrhman opened this issue Nov 14, 2018 · 4 comments

Comments

@arifurrhman
Copy link

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.trafi.anchorbottomsheetbehavior.AnchorBottomSheetBehavior.onInterceptTouchEvent(AnchorBottomSheetBehavior.java:366)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.support.design.widget.CoordinatorLayout.performIntercept(CoordinatorLayout.java:473)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.support.design.widget.CoordinatorLayout.onInterceptTouchEvent(CoordinatorLayout.java:510)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2511)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2968)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1829)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:3321)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:12016)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4809)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4623)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4307)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4364)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4214)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4180)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4188)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4161)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6682)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6656)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6617)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6785)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:178)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6756)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6808)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:778)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:707)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:790)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.os.Looper.loop(Looper.java:172)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6590)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
11-14 10:21:33.204 19987 19987 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

@aantoniv
Copy link

I am also observing the same crash. Any plans to fix it ?

@justasm
Copy link
Member

justasm commented May 1, 2019

Hi, if you'd like us to investigate this, please provide one of

  • steps how to reproduce the crash
  • a sample project that reproduces the crash

@kuwapa
Copy link

kuwapa commented Sep 9, 2019

This crash is happening for me too. Unfortunately, its not a consistent behaviour. Its not happening 95% of the time, but in some cases, it happens right when the activity containing the bottom sheet is started.
I'll try and pinpoint the exact scenario in which it happens.

Screen Shot 2019-09-10 at 1 13 23 AM

UPDATE - It seems to be only happening on Samsung Devices -
Screen Shot 2019-09-13 at 11 29 51 AM

@unshami
Copy link

unshami commented Mar 16, 2021

hi i am new to android studio but i was having the same issue with AnchorSheet lib. I was setting VISIBILITY to parent view of AnchorSheet.
/AndroidRuntime: FATAL EXCEPTION: main Process: com.cenigma.healthiertogether, PID: 25323 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference at com.hardsoftstudio.widget.AnchorSheetBehavior.onInterceptTouchEvent(AnchorSheetBehavior.java:338) at androidx.coordinatorlayout.widget.CoordinatorLayout.performIntercept(CoordinatorLayout.java:502) at androidx.coordinatorlayout.widget.CoordinatorLayout.onInterceptTouchEvent(CoordinatorLayout.java:539) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2696) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3159) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2844) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:601) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1871) at android.app.Activity.dispatchTouchEvent(Activity.java:3384) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:563) at android.view.View.dispatchPointerEvent(View.java:12788) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5670) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5465) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5011) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4977) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5114) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4985) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5171) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5011) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4977) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4985) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4958) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7736) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7676) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7637) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7847) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:197) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:325) at android.os.Looper.loop(Looper.java:142) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

when i changed my code and achieved the same thing with changing state of anchor sheet (AnchorSheetBehavior.STATE_HIDDEN) problem solved.
Hope this may help

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

No branches or pull requests

5 participants