java.lang.OutOfMemoryError

Failed to allocate a 1157788 byte allocation with 135840 free bytes and 132KB until OOM

Samebug tips4

Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp


rafaelrafael

This was issue #159 in Fresco, and was fixed recently, in v1.3.0.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web778

  • via GitHub by BishopGIS
    ,
  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 1157788 byte allocation with 135840 free bytes and 132KB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:824) at android.graphics.Bitmap.createBitmap(Bitmap.java:801) at android.graphics.Bitmap.createBitmap(Bitmap.java:768) at com.nextgis.maplibui.overlay.CurrentLocationOverlay.getAccuracyMarker(CurrentLocationOverlay.java:401) at com.nextgis.maplibui.overlay.CurrentLocationOverlay.draw(CurrentLocationOverlay.java:168) at com.nextgis.maplibui.mapui.MapViewOverlays.onDraw(MapViewOverlays.java:90) at android.view.View.draw(View.java:15251) at android.view.View.updateDisplayListIfDirty(View.java:14187) at android.view.View.getDisplayList(View.java:14209) at android.view.View.draw(View.java:14979) at android.view.ViewGroup.drawChild(ViewGroup.java:3406) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199) at android.view.View.updateDisplayListIfDirty(View.java:14182) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3390) at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3369) at android.view.View.updateDisplayListIfDirty(View.java:14147) at android.view.View.getDisplayList(View.java:14209) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:273) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:279) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:318) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2566) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2382) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2012) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1091) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5926) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:775) at android.view.Choreographer.doCallbacks(Choreographer.java:588) at android.view.Choreographer.doFrame(Choreographer.java:558) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:761) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5273) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Ranjana DangolRanjana Dangol
    9 times, last one
    Unknown visitor
    Unknown visitorOnce,
    AjeetAjeet
    15 times, last one
    aakashaakash
    Once,
    Agócs TamásAgócs Tamás
    28 times, last one
    67 more bugmates