godaddy / compose-color-picker

Jetpack Compose Android Color Picker 🎨
MIT License
369 stars 23 forks source link

Harmony Color Picker, SHADES mode, The wheel slides to the edge position, often does not slide #23

Open willsame opened 2 years ago

willsame commented 2 years ago

Harmony Color Picker, Choose SHADES mode, Slide the color wheel to the edge of the position, will frequently stuck, slide not move.

https://user-images.githubusercontent.com/19715001/165878352-4fde8412-6836-4cd7-8169-1a7d9659da6b.mp4

ffgiraldez commented 2 years ago

thanks for the report, we will loot at it

prasad-333 commented 1 year ago

@riggaroo @ffgiraldez I did some analysis to conclude possible memory leak that might be causing this behavior.

My findings - 1] This behaviour might be there in other modes as well. 2] It could be POSSIBLE that memory leak can be in Android System file (SurfaceContol ) itself.

I raised PR #52 (it does not fix the issue )for anyone else to deep dive or use my branch for further analysis. OR if you want, I can comment-out the STRICT-MODE code with comments for anyone else to un-comment & check whenever required.

StrictMode log -

StrictMode              com.godaddy.android.colorpicker      D  StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. Callsite: readFromParcel
                                                                                                        at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1929)
                                                                                                        at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:305)
                                                                                                        at android.view.SurfaceControl.finalize(SurfaceControl.java:1104)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
                                                                                                        at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
                                                                                                        at java.lang.Daemons$Daemon.run(Daemons.java:139)
                                                                                                        at java.lang.Thread.run(Thread.java:923)

Thanks