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

Out of memory #41

Open
patrickjason91 opened this issue Mar 7, 2015 · 3 comments
Open

Out of memory #41

patrickjason91 opened this issue Mar 7, 2015 · 3 comments

Comments

@patrickjason91
Copy link

Recently as I used the circularimageview, specifically in a ListView, my app crashes out of OutOfMemoryError. This is the exception log:

java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Bitmap.java)
at android.graphics.Bitmap.createBitmap(Bitmap.java:809)
at android.graphics.Bitmap.createBitmap(Bitmap.java:786)
at android.graphics.Bitmap.createBitmap(Bitmap.java:718)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:594)
at com.pkmmte.view.CircularImageView.refreshBitmapShader(CircularImageView.java:393)
at com.pkmmte.view.CircularImageView.onDraw(CircularImageView.java:208)
at android.view.View.draw(View.java:14740)
at android.view.View.buildDrawingCache(View.java:13953)
at android.view.View.getDisplayList(View.java:13612)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.widget.ListView.drawChild(ListView.java:3363)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.widget.AbsListView.dispatchDraw(AbsListView.java:2503)
at android.widget.ListView.dispatchDraw(ListView.java:3358)
at android.view.View.draw(View.java:14743)
at android.widget.AbsListView.draw(AbsListView.java:4039)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1060)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.support.v7.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:509)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.getDisplayList(View.java:13631)
at android.view.View.getDisplayList(View.java:13678)
at android.view.View.draw(View.java:14457)
at android.view.ViewGroup.drawChild(ViewGroup.java:3117)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2954)
at android.view.View.draw(View.java:14743)
at android.widget.FrameLayout.draw(FrameLayout.java:472)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2329)
at android.view.View.getDisplayList(View.java:13636)
at android.view.View.getDisplayList(View.java:13678)
at android.view.HardwareRenderer$GlRenderer.buildDisplayList(HardwareRenderer.java:1570)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1449)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2401)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2273)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1903)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1020)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5762)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:771)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:757)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(NativeStart.java)

@iostreamchik
Copy link

Same result

@aakashbapna
Copy link

+1, crashes my app often.
from stack trace-
com.pkmmte.view.CircularImageView.refreshBitmapShader (CircularImageView.java:341)
com.pkmmte.view.CircularImageView.onDraw (CircularImageView.java:184)
...

@patrickjason91
Copy link
Author

Unfortunately, since the developer of this project did not have any response, I have instead used another awesome Image loading library: https://github.com/hdodenhof/CircleImageView

Doesn't crash and OOM, maybe because of the techniques mentioned on the README. But I do hope the developer of this project still fix the OOM.

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

No branches or pull requests

3 participants