java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: bitmap size exceeds VM budget

tip

For most cases,recommend that you use the Glide library to fetch, decode, and display bitmaps in your app. Glide abstracts out most of the complexity in handling these and other tasks related to working with bitmaps and other images on Android.

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

  • GitHub comment 1171#243378433
    via GitHub by IRMobydick
    ,
  • GitHub comment 1171#243414874
    via GitHub by IRMobydick
    ,
  • GitHub comment 484#108872965
    via GitHub by russellhoff
    ,
  • Out of memory exception
    via GitHub by SachinRana028
    ,
  • GitHub comment 1128#208818649
    via GitHub by frowing
    ,
  • GitHub comment 1474#248057972
    via GitHub by vkramsingh
    ,
  • Glide OutOfMemory(OOM) Issue
    via GitHub by StephenBlufour
    ,
    • java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: bitmap size exceeds VM budget at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:224) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor.afterExecute(FifoPriorityThreadPoolExecutor.java:96) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1096) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) at java.lang.Thread.run(Thread.java:1019) at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:118) Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:470) at com.bumptech.glide.load.resource.bitmap.Downsampler.decodeStream(Downsampler.java:329) at com.bumptech.glide.load.resource.bitmap.Downsampler.downsampleWithSize(Downsampler.java:220) at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:153) at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:50) at com.bumptech.glide.load.resource.bitmap.StreamBitmapDecoder.decode(StreamBitmapDecoder.java:19) at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:39) at com.bumptech.glide.load.resource.bitmap.ImageVideoBitmapDecoder.decode(ImageVideoBitmapDecoder.java:20) at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeBitmapWrapper(GifBitmapWrapperResourceDecoder.java:121) at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:94) at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71) at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61) at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:22) at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:190) at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:177) at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128) at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122) at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101) at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:444) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)

    Users with the same issue

    Unknown visitor2 times, last one,
    dmitry
    dmitry1 times, last one,
    balajivaishnav
    balajivaishnav1 times, last one,
    Unknown visitor1 times, last one,
    Hiren Amaliyar
    Hiren Amaliyar1 times, last one,
    2 more bugmates