skydoves / Cloudy

☁️ Jetpack Compose blur effect library, which falls back onto a CPU-based implementation to support older API levels.
Apache License 2.0
789 stars 28 forks source link

App crashes when Cloudy is used in a ModalBottomSheet #14

Closed Rick-AB closed 1 month ago

Rick-AB commented 1 year ago

Please complete the following information:

Describe the Bug:

When cloudy is used as a component inside a ModalBottomSheet, the exception java.lang.RuntimeException: Failed to copy pixels of the given bitmap! is thrown

Expected Behavior:

The application shouldn't crash

Boriswp commented 1 year ago

Have the same problem, but even in column

AndreyMedal commented 1 year ago

Have the same problem in preview:

FATAL EXCEPTION: main
                                                                                                    Process: com.test.app, PID: 9114
                                                                                                    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:942)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:226)
                                                                                                        at android.os.Looper.loop(Looper.java:313)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:8757)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
iamcodder commented 1 year ago

Have the same problem

HolenZhou commented 7 months ago

Have the same problem

bybozyurt commented 6 months ago

Have the same problem

skydoves commented 1 month ago

Hey guys, 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.