Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiping empty recycler causes crash #3

Open
ericcumbee opened this issue Dec 2, 2014 · 6 comments
Open

swiping empty recycler causes crash #3

ericcumbee opened this issue Dec 2, 2014 · 6 comments

Comments

@ericcumbee
Copy link

Just playing with my app, i noticed that if you swipe an empty swiperecycler it crashes with

java.lang.ArrayIndexOutOfBoundsException: length=12; index=-1 at java.util.ArrayList.get(ArrayList.java:310) at com.fortysevendeg.swipelistview.SwipeListViewTouchListener.closeOtherOpenedItems(SwipeListViewTouchListener.java:997) at com.fortysevendeg.swipelistview.SwipeListViewTouchListener.onTouch(SwipeListViewTouchListener.java:985)

I can post additional code/details tomorrow, but just wanted to put this in before I forgot.

@rahulrj
Copy link
Owner

rahulrj commented Dec 25, 2014

I will look into it and update it. Was just too busy, so took time to notice the issue.
Thanks.

@u2gilles
Copy link

Hi Rahulrj,

It would be great if you could find some time to fix this issue.

In the meanwhile, I added the following quick fix in " in closeOpenedItems() and closeOtherOpenedItems() methods of your lib and recompiled it locally : "if (start==-1) return;"

Also could you please add this lib in a Marven repo and if possible use versions.

Thanks in Advance.

@rahulrj
Copy link
Owner

rahulrj commented Jan 13, 2015

Okay. Will do on the coming Thursday as its a holiday.

@u2gilles
Copy link

Good. I'm afraid my fix has side effects . Better a clean fix from the designer

Sent from Samsung Mobile.

-------- Original message --------
From: RAHUL RAJA [email protected]
Date:13/01/2015 23:51 (GMT+07:00)
To: rahulrj/Swipe_RecyclerView [email protected]
Cc: u2gilles [email protected]
Subject: Re: [Swipe_RecyclerView] swiping empty recycler causes crash (#3)
Okay. Will do on the coming Thursday as its a holiday.


Reply to this email directly or view it on GitHub.

@bvanhou
Copy link

bvanhou commented Jan 19, 2015

I am running into the same issue. Attempting to figure out a fix though do not seem to be succeeding.

01-18 23:10:29.329 1264-1264/com.drinkapp.drink E/MessageQueue-JNI﹕ Exception in MessageQueue callback: handleReceiveCallback
01-18 23:10:29.349 1264-1264/com.drinkapp.drink E/MessageQueue-JNI﹕ java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.fortysevendeg.swipelistview.SwipeListViewTouchListener.closeOtherOpenedItems(SwipeListViewTouchListener.java:1000)
at com.fortysevendeg.swipelistview.SwipeListViewTouchListener.onTouch(SwipeListViewTouchListener.java:986)

@u2gilles
Copy link

We may not use the lib in the same way. I recommend you to use a debugger and notice that when start==-1, it crashed. Then add your own fix to make it works until Rahulrj provides the final patch. .

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

No branches or pull requests

4 participants