Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing memory leaks and hanging UI using IO shimmer #75

Open
saurabhdhillon opened this issue Feb 21, 2019 · 3 comments · May be fixed by #87
Open

Facing memory leaks and hanging UI using IO shimmer #75

saurabhdhillon opened this issue Feb 21, 2019 · 3 comments · May be fixed by #87

Comments

@saurabhdhillon
Copy link

I have attached the log files i received from @baoyongzhang/blockcanary, the library helps in finding UI block issues.
After few minutes of using screens integrated with shimmer layout, i start loosing frames and screen starts laging. On page open i make shimmer visibility VISIBLE and start the animation, on success data from api i stop animation and make shimmer view visibility GONE. I repeat the process multiple time and receive these logs.
PFA logs and screenshots.

qualifier = null
versionName = 1.0.1
versionCode = 2
imei = 868263031622090
uid = null
network = null
model = ONEPLUS A6000
apilevel = 28 9
cpuCore = 8
processName = com.ed.ambience
freeMemory = 1131008
totalMemory = 5769112
timecost = 6822
threadtimecost = 1910
timestart = 02-20 23:49:22.123
timeend = 02-20 23:49:28.945
cpubusy = false
cpurate = null
stack = 02-20 23:49:26.987
java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-20 23:49:27.313

java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-20 23:49:27.651

java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-20 23:49:27.991

java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-20 23:49:28.332

java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

02-20 23:49:28.665

java.util.ArrayList.remove(ArrayList.java:538)
android.view.ViewTreeObserver$CopyOnWriteArray.remove(ViewTreeObserver.java:1189)
android.view.ViewTreeObserver.removeOnPreDrawListener(ViewTreeObserver.java:617)
io.supercharge.shimmerlayout.ShimmerLayout$1.onPreDraw(ShimmerLayout.java:131)
android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2673)
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1635)
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7795)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:1172)
android.view.Choreographer.doCallbacks(Choreographer.java:984)
android.view.Choreographer.doFrame(Choreographer.java:809)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:193)
android.app.ActivityThread.main(ActivityThread.java:6863)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

screenshot_20190221-121803

@FAMM2017
Copy link

FAMM2017 commented Mar 4, 2019

Hi, you can try with this version: implementation 'io.supercharge:shimmerlayout:2.1.0' and let me know how it goes

@saurabhdhillon
Copy link
Author

saurabhdhillon commented Mar 4, 2019

Hey @FAMM2017 i am using this version only.

@EneasVVA
Copy link

I'm experimenting the same problem

@mig35 mig35 linked a pull request Mar 18, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants