Status Update
Comments
du...@google.com <du...@google.com> #2
I believe this has been fixed and is a duplicate of
Can you check against the latest SNAPSHOT or alpha02 when it releases and see if you're still able to reproduce?
Instructions for accessing SNAPSHOTs is here:
du...@google.com <du...@google.com> #3
I'm still subscribed to updates and will be happy to re-open if the issue persists on your end!
(I've tested locally and it seems to work fine, but I noticed you mentioned it was flaky behavior).
ol...@gmail.com <ol...@gmail.com> #4
Everything works fine in alpha02. Thanks!
Description
Steps to reproduce:
1. Open the application
2. Rotate screen immediately or after some time when some list items are loaded
3. Click "refresh" button
The app crashes with exception:
java.lang.IllegalStateException: cannot collect twice from pager
at androidx.paging.PageFetcherSnapshot$pageEventFlow$1.invokeSuspend(PageFetcherSnapshot.kt:94)
at androidx.paging.PageFetcherSnapshot$pageEventFlow$1.invoke(Unknown Source:10)
at androidx.paging.CancelableChannelFlowKt$cancelableChannelFlow$1.invokeSuspend(CancelableChannelFlow.kt:35)
at androidx.paging.CancelableChannelFlowKt$cancelableChannelFlow$1.invoke(Unknown Source:10)
at kotlinx.coroutines.flow.ChannelFlowBuilder.collectTo$suspendImpl(Builders.kt:327)
at kotlinx.coroutines.flow.ChannelFlowBuilder.collectTo(Unknown Source:0)
at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:33)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.EventLoop.processUnconfinedEvent(EventLoop.common.kt:69)
at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:184)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:108)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:306)
at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:393)
at kotlinx.coroutines.channels.AbstractChannel$ReceiveElement.completeResumeReceive(AbstractChannel.kt:888)
at kotlinx.coroutines.channels.ConflatedChannel.offerInternal(ConflatedChannel.kt:62)
at kotlinx.coroutines.channels.ConflatedBroadcastChannel$Subscriber.offerInternal(ConflatedBroadcastChannel.kt:295)
at kotlinx.coroutines.channels.ConflatedBroadcastChannel.offerInternal(ConflatedBroadcastChannel.kt:257)
at kotlinx.coroutines.channels.ConflatedBroadcastChannel.offer(ConflatedBroadcastChannel.kt:238)
at androidx.paging.PageFetcher.refresh(PageFetcher.kt:97)
at androidx.paging.PageFetcher$PagerUiReceiver.refresh(PageFetcher.kt:114)
at androidx.paging.PagingDataDiffer.refresh(PagingDataDiffer.kt:146)
at androidx.paging.AsyncPagingDataDiffer.refresh(AsyncPagingDataDiffer.kt:227)
at androidx.paging.PagingDataAdapter.refresh(PagingDataAdapter.kt:147)
at dev.olshevski.paging3sandbox.MainActivity$onCreate$2.onClick(MainActivity.kt:34)
at android.view.View.performClick(View.java:7259)
at android.view.View.performClickInternal(View.java:7236)
at android.view.View.access$3600(View.java:801)
at android.view.View$PerformClick.run(View.java:27892)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
It seems to work fine once in a while depending on the load state, but mostly crashes.
Component used: androidx.paging:paging-runtime
Version used: 3.0.0-alpha01
Devices/Android versions reproduced on: Pixel 3 / Android 10