android-swipelistview-sharp icon indicating copy to clipboard operation
android-swipelistview-sharp copied to clipboard

Crash sometimes happens on touch

Open ldtsch opened this issue 8 years ago • 2 comments

I get the following issue. Seems to be somewhere in java code. Maybe updated Jars would work?

java.util.ArrayListInvalid index 15, size is 11

--- End of managed exception stack trace --- java.lang.IndexOutOfBoundsException: Invalid index 15, size is 11 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at com.fortysevendeg.swipelistview.SwipeListViewTouchListener.onTouch(SwipeListViewTouchListener.java:786) at com.fortysevendeg.swipelistview.SwipeListView.onInterceptTouchEvent(SwipeListView.java:653) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2366) at android.widget.AbsListView.dispatchTouchEvent(AbsListView.java:5547) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2456) at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2831) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1863) at android.app.Activity.dispatchTouchEvent(Activity.java:3046) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60) at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2792) at android.view.View.dispatchPointerEvent(View.java:10228) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5350) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5186) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4679) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4645) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4787) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4653) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4844) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4679) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4645) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4653) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7312) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7190) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7151) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7422) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:323) at android.os.Looper.loop(Looper.java:143) at android.app.ActivityThread.main(ActivityThread.java:7229) 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)

ldtsch avatar May 30 '16 22:05 ldtsch

Isn't this related to your data, just looking at the stacktrace java.lang.IndexOutOfBoundsException: Invalid index 15, size is 11 are trying to get an item by index and the index number is greater than the number of items in the array?

MilenPavlov avatar Jun 17 '16 08:06 MilenPavlov

I doubt it since I can't catch the exception anywhere in my C# code - it seems more like the java code in Swipelistview somehow "captures" touch events at non existent indexes and fails to handle these exceptions correctly so the entire App crashes which is quite unfortunate. I haven't found a way to consistently reproduce this error - it sometimes occurs but not in a reproducable pattern.. The original 47degrees swipelistview seems to not be available anymore on GitHub unfortunately otherwise I'd try to locate the error there.. So it seems like I have to stick with the current version.

ldtsch avatar Jun 17 '16 11:06 ldtsch