-
Notifications
You must be signed in to change notification settings - Fork 140
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
IndexOutOfBoundsException when calling getTab() #20
Comments
Thanks for reporting this issue. I just tried to reproduce the crash you have reported, but unfortunately I wasn't able to do so. Do you know a way to reliably trigger the crash other than randomly removing/adding tabs and swiping around? |
No, I don't have a way to reliably trigger the crash now. |
To provide a little more context, we've started using this component in the official Wikipedia app, and have been seeing this crash very sporadically from our users, although we haven't been able to reproduce it ourselves. It doesn't seem to be specific to any particular device or API version, and the actual "index out of bounds" numbers are highly variable (not just "Index: 15, Size: 8"). We'll keep trying to reproduce. |
Wow, I wasn't aware that this library is used in an app that popular. I will see, if I can make any guesses about what might go wrong in these cases by taking a deeper look at the code. |
I have managed to reproduce the crash in your "example" app that is included in the repo. It happens if I repeatedly click near the bottom-right corner (which closes a tab that is off-screen at the bottom), and also keep clicking the "Undo" action in the snackbar, which is in the same location. If I do this a sufficient number of times very quickly, then scroll up, the crash occurs. Here is a video that demonstrates my actions: https://youtu.be/AXCIDuQlNTY |
I was able to reproduce the crash that is shown in your video. Thank's for that! However, I am not sure if this is actually the crash the stacktrace that was posted above corresponds to. This is because Logcat does not show an
|
Yes, I have seen this stack trace as well, but the original one also happens (with the same repro steps), perhaps less frequently. |
Okay, so the stacktraces are probably related to each other. I will investigate further and will see how to possibly fix this. |
One other update: |
OK! we have a much better minimal reproducible case (thanks @cooltey):
|
I just published a new release 0.3.6. that provides kind of a workaround. Clicking the close buttons of tabs that are "stacked" at the bottom (or top) is now prevented (they shouldn't be clickable anyway). This should prevent crashes as shown in the first two of your videos. However, this is not a proper fix of the underlying problem and it is still possible to cause a crash as shown in the third video (I was able to do so). |
I am now able to very reliably reproduce the issue and I know its cause. I just need to find a way to properly solve it... |
...and it is solved! At least I wasn't able to cause any more crashes when testing. The fix is included in release 0.3.7. It would be great if anyone could confirm that the issue is gone now. |
Thanks, @michael-rapp! |
That is looking much better! Thanks for the quick turnaround. I can no longer reproduce it myself, so I'm going to deploy to our Beta audience and see if any further reports come in. |
- Looks like the owner fixed the issue! - michael-rapp/ChromeLikeTabSwitcher#20 (comment) Change-Id: I09d771fbb6935666f3a2ee5c9182050ea889acb9
Steps to reproduce:
Stacktrace:
The text was updated successfully, but these errors were encountered: