Meetic / Shuffle

An easy to use swiping-view for Android
885 stars 83 forks source link

IndexOutOfBoundsException #9

Closed mgursch closed 8 years ago

mgursch commented 8 years ago

Hey again,

my app has a bottom bar with 5 fragments. one of them contains the shuffle view. If I change the fragments very fast I get the following Exception.

FATAL EXCEPTION: main java.lang.IndexOutOfBoundsException at java.util.LinkedList.get(LinkedList.java:519) at com.meetic.shuffle.Shuffle.updateAdapter(Shuffle.java:261) at com.meetic.shuffle.Shuffle$1.animationMiddle(Shuffle.java:144) at com.meetic.shuffle.ShuffleViewAnimator$1.onAnimationEnd(ShuffleViewAnimator.java:91) at android.support.v4.view.ViewPropertyAnimatorCompatJB$1.onAnimationEnd(ViewPropertyAnimatorCompatJB.java:47) at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1114) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239) at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766) at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920) at android.view.Choreographer.doCallbacks(Choreographer.java:695) at android.view.Choreographer.doFrame(Choreographer.java:628) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

florent37 commented 8 years ago

you called .restartShuffling() ? because com.meetic.shuffle.Shuffle$1.animationMiddle is only called after this method

mgursch commented 8 years ago

i call restartShuffeling() show a loading indicator start background loading change to another fragment (via bottom bar) -> crash

florent37 commented 8 years ago

ok I'll investigate it

mgursch commented 8 years ago

Is there any progress?

florent37 commented 8 years ago

I fixed it, I created a temporary version named 1.0.5.5, can you try it ?

mgursch commented 8 years ago

Thanks - seems to be fixed. tested it shortly, didnt see that crash.

florent37 commented 8 years ago

so I can merge it on the 1.0.7 ?

mgursch commented 8 years ago

think its fine :)

thanks again for your support

florent37 commented 8 years ago

👍