lopspower / CircularImageView

Create circular ImageView in Android in the simplest way possible
Apache License 2.0
1.95k stars 413 forks source link

java.lang.OutOfMemoryError Cuse Crash #88

Closed MAyaghmay closed 6 years ago

MAyaghmay commented 6 years ago

I'm Using Glide v4 for downloading and showing Image but it just crash with this error:

I disable Transition in Glide v4.

Round Pictures: CircleImageView/CircularImageView/RoundedImageView are known to have issues with TransitionDrawable (.crossFade() with .thumbnail() or .placeholder()) and animated GIFs, use a BitmapTransformation (.circleCrop() will be available in v4) or .dontAnimate() to fix the issue.

but the problem still existed.

`java.lang.OutOfMemoryError:

at dalvik.system.VMRuntime.newNonMovableArray (Native Method)

at android.graphics.Bitmap.nativeCreate (Native Method)

at android.graphics.Bitmap.createBitmap (Bitmap.java:879)

at android.graphics.Bitmap.createBitmap (Bitmap.java:856)

at android.graphics.Bitmap.createBitmap (Bitmap.java:776)

at android.graphics.Bitmap.createBitmap (Bitmap.java:701)

at com.mikhaellopez.circularimageview.CircularImageView.cropBitmap (CircularImageView.java:206)

at com.mikhaellopez.circularimageview.CircularImageView.updateShader (CircularImageView.java:183)

at com.mikhaellopez.circularimageview.CircularImageView.loadBitmap (CircularImageView.java:156)

at com.mikhaellopez.circularimageview.CircularImageView.onDraw (CircularImageView.java:127)

at android.view.View.draw (View.java:17337)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.draw (View.java:17349)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.support.v7.widget.RecyclerView.drawChild (RecyclerView.java:4581)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.draw (View.java:17349)

at android.support.v7.widget.RecyclerView.draw (RecyclerView.java:3987)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.draw (View.java:17349)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.support.design.widget.CoordinatorLayout.drawChild (CoordinatorLayout.java:1229)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.support.v4.widget.DrawerLayout.drawChild (DrawerLayout.java:1366)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.draw (View.java:17349)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at android.view.View.updateDisplayListIfDirty (View.java:16268)

at android.view.View.draw (View.java:17087)

at android.view.ViewGroup.drawChild (ViewGroup.java:3890)

at android.view.ViewGroup.dispatchDraw (ViewGroup.java:3676)

at com.android.internal.policy.DecorView.dispatchDraw (DecorView.java:792)

at android.view.View.draw (View.java:17349)

at com.android.internal.policy.DecorView.draw (DecorView.java:778)

at android.view.View.updateDisplayListIfDirty (View.java:16276)

at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:661)

at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:667)

at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:775)

at android.view.ViewRootImpl.draw (ViewRootImpl.java:3192)

at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:2985)

at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2573)

at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1462)

at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:6969)

at android.view.Choreographer$CallbackRecord.run (Choreographer.java:907)

at android.view.Choreographer.doCallbacks (Choreographer.java:709)

at android.view.Choreographer.doFrame (Choreographer.java:644)

at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:893)

at android.os.Handler.handleCallback (Handler.java:836)

at android.os.Handler.dispatchMessage (Handler.java:103)

at android.os.Looper.loop (Looper.java:203)

at android.app.ActivityThread.main (ActivityThread.java:6251)

at java.lang.reflect.Method.invoke (Native Method)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1063)

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:924)`