skydoves / Cloudy

☁️ Jetpack Compose blur effect library, which falls back onto a CPU-based implementation to support older API levels.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HorizontalPager scroll next page crash

BlueSky15171 opened this issue · comments

Please complete the following information:

  • Library Version 0.1.2
  • Affected Device(s) aosp 11

Describe the Bug:
java.lang.RuntimeException: Failed to copy pixels of the given bitmap!
at com.skydoves.cloudy.CloudyKt.drawBitmapWithPixelCopy$lambda$7(Cloudy.kt:281)
at com.skydoves.cloudy.CloudyKt.$r8$lambda$X2Nw-BPO6_ca_Hnlrx5we4hyARg(Unknown Source:0)
at com.skydoves.cloudy.CloudyKt$$ExternalSyntheticLambda0.onPixelCopyFinished(Unknown Source:6)
at android.view.PixelCopy$1.run(PixelCopy.java:191)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7723)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@459a31, androidx.compose.runtime.BroadcastFrameClock@583c516, StandaloneCoroutine{Cancelling}@42bce97, AndroidUiDispatcher@f632884]

Expected Behavior:
HorizontalPager scroll next page crash

HorizontalPager{
LazyVerticalGrid(scroll = false)
}

how can fix this?

Hey @BlueSky15171, the new version 0.2.0 has been released, and now you can resolve this issue by using the Modifier.cloudy modifier instead of the Cloudy composable function.