-
Notifications
You must be signed in to change notification settings - Fork 730
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 using Paging3 #1220
Comments
Ok, I think I got the problem. I moved the Controller from the paging integration library to the paging3 library.
Moving the function to this one, makes the crash disappear:
Should we exchange this approach for a function that returns a list, to make it more clear? |
In your first example, what is If it is error prone to use this API correctly then it does seem like we should do something to improve it. Changing the function signature is a breaking change though which is not ideal - another possibility is to add internal safety checks that make the error message much more clear so you can easily understand what you've done wrong and what to do instead |
In the first example, I'm using the Kotlin builder to add the model
On the second one, I'm using the standard way to return the model
|
So are you suggesting in some way, to check that the total models on the controller are the same as the added ones? |
oh, I see, yeah you can't add models directly like that in the paging controller. |
Actually, I'm rusty on this, but it does seem like your original method should work fine. It's hard to see why your updated function changes anything. The exception is in
I believe, which is strange because bounds checks are done, which make it seem like this is a concurrency issue |
If I remember correctly there was a similar concurrency issue with paging2... |
I tried to synchronize a few methods, but I started getting an IndexOutOfBoundsException at:
and in other places in the code. |
I am getting the same crash on v5.1.1. Are there any potential fixes to this issue? |
@alexanderar I moved directly from paging2 epoxy to compose, but this problem was never fixed 🫤🫤 |
Hey, I've moved one of my projects from Paging2 to Paging3 and I'm noticing an Exception.
I updated to the very latest version of Epoxy (4.6.2), but I can see this issue with 4.5.0 as well.
I'm guessing it's some edge case with the paging3 integration, it's happening while reloading the list content and showing the loading item on the screen. It's not happening all the time, seemly at random.
Can anyone guess what's the problem? or a potential quick fix?
Thanks in advance.
The text was updated successfully, but these errors were encountered: