Java.Lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference

2 posts, 0 answers
  1. Namysław
    Namysław avatar
    44 posts
    Member since:
    Jul 2017

    Posted 27 Oct 2017 Link to this post

    I've found issue at latest Telerik release (2017.3.1018.240) on my HockeyApp crashes list, but I'm not able to reproduce it again.

    java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.handlePan(RadSideDrawer.java:535)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.handleOnMove(RadSideDrawer.java:518)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onGesture(RadSideDrawer.java:442)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onInterceptTouchEvent(RadSideDrawer.java:420)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.dispatchTouchEvent(Platform_DefaultRenderer.java:54)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.dispatchTouchEvent(Platform_DefaultRenderer.java:54)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.dispatchTouchEvent(PlatformRenderer.java:55)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:416)
        at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1808)
        at android.app.Activity.dispatchTouchEvent(Activity.java:3065)
        at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:378)
        at android.view.View.dispatchPointerEvent(View.java:10244)
        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4444)
        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4312)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3912)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3878)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4005)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3886)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4062)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3912)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3878)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3886)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6253)
        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6227)
        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6188)
        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6356)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
        at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
        at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
        at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6327)
        at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6379)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
        at android.view.Choreographer.doCallbacks(Choreographer.java:686)
        at android.view.Choreographer.doFrame(Choreographer.java:615)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6186)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
    Xamarin caused by: Java.Lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0
      at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in <1d799d87381c4db5b1252825fd105b84>:0
      at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <1d799d87381c4db5b1252825fd105b84>:0
      at Android.Views.View.DispatchTouchEvent (Android.Views.MotionEvent e) [0x00031] in <c82a099136944d8aa96281cf061cbc12>:0
      at Xamarin.Forms.Platform.Android.VisualElementRenderer`1[TElement].DispatchTouchEvent (Android.Views.MotionEvent e) [0x0000a] in D:\agent\_work\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:63
      at Android.Views.View.n_DispatchTouchEvent_Landroid_view_MotionEvent_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_e) [0x0000f] in <c82a099136944d8aa96281cf061cbc12>:0
      at (wrapper dynamic-method) System.Object:32a00490-e740-48ae-9824-eb8a5ec0707b (intptr,intptr,intptr)
      --- End of managed Java.Lang.NullPointerException stack trace ---
    java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.MotionEvent.getX()' on a null object reference
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.handlePan(RadSideDrawer.java:535)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.handleOnMove(RadSideDrawer.java:518)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onGesture(RadSideDrawer.java:442)
        at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onInterceptTouchEvent(RadSideDrawer.java:420)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2175)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.dispatchTouchEvent(Platform_DefaultRenderer.java:54)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.Platform_DefaultRenderer.dispatchTouchEvent(Platform_DefaultRenderer.java:54)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementRenderer_1.dispatchTouchEvent(VisualElementRenderer_1.java:64)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_dispatchTouchEvent(Native Method)
        at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.dispatchTouchEvent(PlatformRenderer.java:55)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2321)
        at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:416)
        at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1808)
        at android.app.Activity.dispatchTouchEvent(Activity.java:3065)
        at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:378)
        at android.view.View.dispatchPointerEvent(View.java:10244)
        at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4444)
        at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4312)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3912)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3878)
        at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4005)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3886)
        at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4062)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3912)
        at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3878)
        at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3886)
        at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3859)
        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6253)
        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6227)
        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6188)
        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6356)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
        at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
        at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
        at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6327)
        at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6379)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
        at android.view.Choreographer.doCallbacks(Choreographer.java:686)
        at android.view.Choreographer.doFrame(Choreographer.java:615)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6186)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    665 posts

    Posted 31 Oct 2017 Link to this post

    Hi, Namyslaw,

    Thank you for the crash report. Actually, I have noticed that the issue is already discussed in another thread and my colleague has logged a bug report at our end - SideDrawer [Android]: When opening the Sidedrawer sometimes a NullReferenceException is thrown.  As we are not able to reproduce it, we cannot be sure in what scenario it appears. However, we will apply a blind fix to try resolving it. Please follow the item so you are notified when this happens.

    Have a great rest of the week.

    Regards,
    Stefan Nenchev
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top