android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.44k stars 8.28k forks source link

Paging throw IndexOutOfBoundsException:Index:1,Size:1 [BUG] #904

Closed xyz-fly closed 4 years ago

xyz-fly commented 4 years ago

Used Paging 3.0.0-alpha06

error log is

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
 at java.util.ArrayList.get(ArrayList.java:437)
 at androidx.paging.PageFetcherSnapshot.currentPagingState(PageFetcherSnapshot.kt:690)
 at androidx.paging.PageFetcherSnapshot.doInitialLoad(PageFetcherSnapshot.kt:377)
 at androidx.paging.PageFetcherSnapshot$doInitialLoad$1.invokeSuspend(Unknown Source:12)
 at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
 at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
 at android.os.Handler.handleCallback(Handler.java:914)
 at android.os.Handler.dispatchMessage(Handler.java:100)
 at android.os.Looper.loop(Looper.java:236)
 at android.app.ActivityThread.main(ActivityThread.
dlam commented 4 years ago

Issues on this Github are meant for the samples, but this seems to be a duplicate of https://issuetracker.google.com/168644324 which already has a fix pending merge.