Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

using finger to fast swipe may cause exception #7

Open
xalexchen opened this issue Sep 24, 2013 · 10 comments
Open

using finger to fast swipe may cause exception #7

xalexchen opened this issue Sep 24, 2013 · 10 comments
Labels

Comments

@xalexchen
Copy link

yes,i try to help u find out the #4 ,but i found another bugs here when i using finger to fast swipe the item.may cause the following exception

09-24 17:25:52.765 25820-25820/de.timroes.android.listviewdemo W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x40bb7300)
09-24 17:25:52.765 25820-25820/de.timroes.android.listviewdemo E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IndexOutOfBoundsException: Invalid index 26, size is 21
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
at java.util.ArrayList.get(ArrayList.java:304)
at de.timroes.android.listviewdemo.MainActivity$EnhancedListAdapter.getItem(MainActivity.java:312)
at de.timroes.android.listviewdemo.MainActivity$4.onDismiss(MainActivity.java:127)
at de.timroes.android.listview.EnhancedListView$3.onAnimationEnd(EnhancedListView.java:745)
at com.nineoldandroids.animation.ValueAnimator.endAnimation(ValueAnimator.java:1034)
at com.nineoldandroids.animation.ValueAnimator.access$900(ValueAnimator.java:43)
at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:669)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4931)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)

@timroes
Copy link
Owner

timroes commented Sep 24, 2013

Could you tell me what device you are using and what android version? Anyway how fast I swipe and which order, I am unable to reproduce that :(

@xalexchen
Copy link
Author

order: from left to right
Devices:Samsung Galaxy Tab 10.1 GT-P7500
ROM: CM-10-20130725-UNOFFICIAL-p4 Android 4.1.2

hope can help u , i can easy to make this happen.just fast swipe one by one (near by item)

xalexchen

From: Tim Roes
Date: 2013-09-24 17:34
To: timroes/EnhancedListView
CC: Alex.Chen
Subject: Re: [EnhancedListView] using finger to fast swipe may cause exception (#7)
Could you tell me what device you are using and what android version? Anyway how fast I swipe and which order, I am unable to reproduce that :(

Reply to this email directly or view it on GitHub.

@timroes
Copy link
Owner

timroes commented Sep 24, 2013

Thanks I hope that will help to reproduce that bug (at least I know someone with that device :D). If you downloaded the app from Google Play, and can cause this again, it would be very kind, if you could send an error report via Google Play. Thanks again for your help!

@xalexchen
Copy link
Author

:D you are welcome. and i just download it from Google Play and make a crush ,the report already send to google .

xalexchen

From: Tim Roes
Date: 2013-09-24 17:50
To: timroes/EnhancedListView
CC: Alex.Chen
Subject: Re: [EnhancedListView] using finger to fast swipe may cause exception (#7)
Thanks I hope that will help to reproduce that bug (at least I know someone with that device :D). If you downloaded the app from Google Play, and can cause this again, it would be very kind, if you could send an error report via Google Play. Thanks again for your help!

Reply to this email directly or view it on GitHub.

@timroes
Copy link
Owner

timroes commented Sep 24, 2013

I've just published an update to the demo app in the play store. Could you check if this error still persists. I have a feeling, that it might be linked to the fixed bug with too fast swiping. If it's not fixed please tell me, I will then need to find someone with a device, that I can use to reproduce this.

@timroes
Copy link
Owner

timroes commented Sep 24, 2013

BTW Google Play needs some time to update the APK. So you would need to make sure its version 0.1.1 installed, when testing :)

@timroes
Copy link
Owner

timroes commented Sep 26, 2013

Unfortunately the bug still persist. I haven't been able to isolate and fix it.
But you really have to swipe fast to make it appear, so it shouldn't be something that occurs when users use this in a normal way. I will continue looking for it, but unfortunately I don't have access to a device where I can reproduce it all the time.

@xalexchen
Copy link
Author

aha.yep.no one will do that like me :D
anyway.it's a great stuff.

xalexchen

From: Tim Roes
Date: 2013-09-27 03:20
To: timroes/EnhancedListView
CC: Alex.Chen
Subject: Re: [EnhancedListView] using finger to fast swipe may cause exception (#7)
Unfortunately the bug still persist. I haven't been able to isolate and fix it.
But you really have to swipe fast to make it appear, so it shouldn't be something that occurs when users use this in a normal way. I will continue looking for it, but unfortunately I don't have access to a device where I can reproduce it all the time.

Reply to this email directly or view it on GitHub.

@MarcoLizza
Copy link
Contributor

I'm using the library in an application of mine and the same bug occurs. The same bug was present in the older incarnation of the library (prior its name change). I find the issue to be quite annoying.I'm trying to pinpoint it but still wasn't able to do it. However, I'm quite sure its due to the fact that the list/adapter/data indexes changes after an item has been dismissed... so the next dismiss can refer to an invalid item.

As a workaround, should a "single-swipe-at-time" bahaviour could be provided?

Thanks in advance.

@localh0rzd
Copy link

I played around with this problem a little bit and found out the following:

  • If you manage to focus on a list entry that is below the one being swiped out, the exception is often thrown when you slide this view afterwards
  • If you swipe the remaining view a bit (not far enough to trigger onDismiss) and press undo while the view is sliding back, the content of the view sliding back remains untouched:
before after
1 2
2 2

It seems that this issue has to do something with the views of the list not being updated fast enough and hence reference the not longer valid index.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants