Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference
See original GitHub issueIt works, but sometimes it shows this error: (Double Tap)
I don’t know how to replicate tho 😕
Process: com.test.testmenu, PID: 5675
java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference
at com.github.nisrulz.sensey.TouchTypeDetector$a.onScroll(SourceFile:169)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:619)
at android.support.v4.view.GestureDetectorCompat$GestureDetectorCompatImplJellybeanMr2.onTouchEvent(GestureDetectorCompat.java:479)
at android.support.v4.view.GestureDetectorCompat.onTouchEvent(GestureDetectorCompat.java:542)
at com.github.nisrulz.sensey.Sensey.setupDispatchTouchEvent(SourceFile:4102)
at com.quarkprojects.detetordeazeite.MainActivity.dispatchTouchEvent(MainActivity.java:1202)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2364)
at android.view.View.dispatchPointerEvent(View.java:9514)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6025)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Android: Attempt to invoke virtual method (onTouch) on a null ...
Basically your gDetector must be null and there's an attempt to call its onTouchEvent(...) method causing the NPE. The problem is where you ......
Read more >Attempt to invoke virtual method 'float android.view ... - Telerik
Java.Lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference.
Read more >CoordinatorLayout NPE: java.lang.NullPointerException: Attempt to ...
java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference at android.view.View.
Read more >VelocityTracker | Android Developers
Retrieve a new VelocityTracker object to watch the velocity of a motion. ... The finalize method is never invoked more than once by...
Read more >Java – Android: Attempt to invoke virtual method (onTouch) on a null ...
Java – Android: Attempt to invoke virtual method (onTouch) on a null ... getX() - e2. ... MotionEvent)' on a null object reference...
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
Hmm… good to know that. I am closing this issue until it resurfaces again.
I don’t know if it’s related but I’ve gotten a couple of somewhat similar crashes. Please let me know if you’d prefer that UI open a new issue for it. See below:
Device was a Samsung Galaxy J7 Neo running Android 9 (SDK 28).
Any idea how I could investigate the source of this error? Thanks!