Opened 8 months ago

Closed 8 months ago

#2488 closed defect (fixed)

Android onTouch error

Reported by: Meeh Owned by: Meeh
Priority: minor Milestone: 0.9.40
Component: apps/android Version: 0.9.39
Keywords: Cc:
Parent Tickets: Sensitive: no

Description (last modified by Meeh)

java.lang.NullPointerException: 
  at android.support.v4.view.ViewPager.fakeDragBy (ViewPager.java:2626)
  at com.viewpagerindicator.TitlePageIndicator.onTouchEvent (TitlePageIndicator.java:573)
  at android.view.View.dispatchTouchEvent (View.java:12540)
  at android.view.ViewGroup.dispatchTransformedTouchEvent (ViewGroup.java:3181)
  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 android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent (WindowCallbackWrapper.java:69)
  at android.support.v7.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:5668)
  at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:5463)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4956)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5009)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4975)
  at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:5112)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4983)
  at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:5169)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4956)
  at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:5009)
  at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4975)
  at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4983)
  at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4956)
  at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:7734)
  at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:7674)
  at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:7635)
  at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent (ViewRootImpl.java:7845)
  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)

Subtickets

Change History (6)

comment:1 Changed 8 months ago by Meeh

Description: modified (diff)

comment:2 Changed 8 months ago by zzz

no i2p classes in the trace, but both our TunnelsContainer? and AddressbookContainer? reference TitlePageIndicator?. Let's try to reproduce it

comment:4 Changed 8 months ago by zzz

passing an int so the problem isn't that call.

ViewPagerIndicator? library last changed Sept. 12, 2012, with release 2.4.1.
135 open issues including lots of NPEs.
It's been forked 4200+ times

looks like in our build.gradle we're on this fork and version 2.4.4
https://github.com/InkApplications/Android-ViewPagerIndicator/releases
last release 2.4.4 June 30 2016 and only one issue

sample source, line numbers don't match:
https://android.googlesource.com/platform/frameworks/support/+/refs/tags/android-7.0.0_r36/v4/java/android/support/v4/view/ViewPager.java

comment:5 Changed 8 months ago by zzz

here's the right source, with NPE at line 2626, mVelocityAdapter is null,
but beginFakeDrag() should have set it non-null, so still a mystery but getting closer

http://androidxref.com/9.0.0_r3/xref/frameworks/support/viewpager/src/main/java/androidx/viewpager/widget/ViewPager.java#2585

comment:6 Changed 8 months ago by zzz

Milestone: undecided0.9.40
Resolution: fixed
Status: newclosed

Fixed as suggested in
Nov. 20 2013 comment at
https://github.com/JakeWharton/ViewPagerIndicator/pull/257

reproduced and then verified fixed by idk

in 857e813c6899e52d33a0763239219c5b83c580e9 to be 0.9.40

Note: See TracTickets for help on using tickets.