Android-SwipeToDismiss-RecyclerView
Android-SwipeToDismiss-RecyclerView copied to clipboard
Bug on sample: crash
Did some serious swiping on my device running Lollipop, and it crashed.I think it happened when I have swiped an item at the end, while another one was animating.
Log:
01-13 00:32:58.160 30495-30495/com.example.android.swipedismiss.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.example.android.swipedismiss.debug, PID: 30495 java.lang.IndexOutOfBoundsException: Invalid index 5, size is 5 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.remove(ArrayList.java:403) at com.example.android.swipedismiss.MainActivity$2.onDismiss(MainActivity.java:107) at com.example.android.swipedismiss.SwipeDismissRecyclerViewTouchListener$3.onAnimationEnd(SwipeDismissRecyclerViewTouchListener.java:367) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1089) at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:666) at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:682) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5223) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
This is a duplicate issue of original library #18
Seems like something I've reported in the past. :) Sorry for that.
I could not reproduce this issue, but I found guy, who maybe fixed this issue. I pushed this fix to repository. It would be great, if you could check whether or not issue is reproduced for you.
I can still reproduce it. I think I've done it by swiping the last item together with another. Not sure about the order.
01-13 22:32:24.475 7455-7455/com.example.android.swipedismiss.debug E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.example.android.swipedismiss.debug, PID: 7455 java.lang.IndexOutOfBoundsException: Invalid index 8, size is 8 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.remove(ArrayList.java:403) at com.example.android.swipedismiss.MainActivity$2.onDismiss(MainActivity.java:107) at com.example.android.swipedismiss.SwipeDismissRecyclerViewTouchListener$3.onAnimationEnd(SwipeDismissRecyclerViewTouchListener.java:381) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1089) at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:666) at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:682) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:549) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5223) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)