<p dir="auto">Hi bro,<br>
The below is my stacktrace.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="12-18 23:44:05.602: D/dalvikvm(1966): VFY: replacing opcode 0x6e at 0x000a
12-18 23:44:05.670: D/dalvikvm(1966): GC_FOR_ALLOC freed 290K, 8% free 5596K/6020K, paused 3ms, total 4ms
12-18 23:44:06.294: D/dalvikvm(1966): GC_FOR_ALLOC freed 321K, 8% free 5750K/6208K, paused 2ms, total 3ms
12-18 23:44:06.298: D/dalvikvm(1966): GC_FOR_ALLOC freed 21K, 8% free 5875K/6356K, paused 3ms, total 3ms
12-18 23:44:06.386: D/dalvikvm(1966): GC_FOR_ALLOC freed 38K, 9% free 5915K/6436K, paused 4ms, total 4ms
12-18 23:44:06.386: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.059MB for 162024-byte allocation
12-18 23:44:06.390: D/dalvikvm(1966): GC_FOR_ALLOC freed 78K, 10% free 5995K/6596K, paused 3ms, total 3ms
12-18 23:44:06.494: D/dalvikvm(1966): GC_FOR_ALLOC freed &lt;1K, 10% free 5995K/6596K, paused 4ms, total 4ms
12-18 23:44:06.494: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.293MB for 325864-byte allocation
12-18 23:44:06.498: D/dalvikvm(1966): GC_FOR_ALLOC freed 158K, 12% free 6155K/6916K, paused 6ms, total 6ms
12-18 23:44:06.610: D/dalvikvm(1966): GC_FOR_ALLOC freed 1K, 12% free 6155K/6916K, paused 2ms, total 2ms
12-18 23:44:06.638: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.762MB for 653544-byte allocation
12-18 23:44:06.650: D/dalvikvm(1966): GC_FOR_ALLOC freed 318K, 15% free 6475K/7556K, paused 11ms, total 11ms
12-18 23:44:06.754: D/dalvikvm(1966): GC_FOR_ALLOC freed 4K, 15% free 6475K/7556K, paused 2ms, total 2ms
12-18 23:44:06.758: I/dalvikvm-heap(1966): Grow heap (frag case) to 7.700MB for 1308904-byte allocation
12-18 23:44:06.762: D/dalvikvm(1966): GC_FOR_ALLOC freed 638K, 20% free 7115K/8836K, paused 3ms, total 3ms
12-18 23:44:06.894: D/dalvikvm(1966): GC_FOR_ALLOC freed 8K, 20% free 7115K/8836K, paused 2ms, total 2ms
12-18 23:44:06.898: I/dalvikvm-heap(1966): Grow heap (frag case) to 9.575MB for 2619624-byte allocation
12-18 23:44:06.902: D/dalvikvm(1966): GC_FOR_ALLOC freed 1278K, 27% free 8395K/11396K, paused 3ms, total 3ms
12-18 23:44:07.662: D/dalvikvm(1966): GC_FOR_ALLOC freed 17K, 27% free 8395K/11396K, paused 9ms, total 9ms
12-18 23:44:07.678: I/dalvikvm-heap(1966): Grow heap (frag case) to 13.325MB for 5241064-byte allocation
12-18 23:44:07.690: D/dalvikvm(1966): GC_FOR_ALLOC freed 2558K, 34% free 10955K/16516K, paused 7ms, total 7ms
12-18 23:44:09.762: D/dalvikvm(1966): GC_FOR_ALLOC freed 33K, 34% free 10955K/16516K, paused 8ms, total 8ms
12-18 23:44:09.798: I/dalvikvm-heap(1966): Grow heap (frag case) to 20.825MB for 10483944-byte allocation
12-18 23:44:09.806: D/dalvikvm(1966): GC_FOR_ALLOC freed 5118K, 40% free 16075K/26756K, paused 5ms, total 5ms
12-18 23:44:14.278: D/dalvikvm(1966): GC_FOR_ALLOC freed 64K, 40% free 16075K/26756K, paused 11ms, total 11ms
12-18 23:44:14.334: I/dalvikvm-heap(1966): Grow heap (frag case) to 35.825MB for 20969704-byte allocation
12-18 23:44:14.342: D/dalvikvm(1966): GC_FOR_ALLOC freed 10238K, 45% free 26315K/47236K, paused 4ms, total 4ms
12-18 23:44:19.198: D/dalvikvm(1966): GC_FOR_ALLOC freed 124K, 45% free 26315K/47236K, paused 11ms, total 12ms
12-18 23:44:19.274: I/dalvikvm-heap(1966): Grow heap (frag case) to 65.825MB for 41941224-byte allocation
12-18 23:44:19.286: D/dalvikvm(1966): GC_FOR_ALLOC freed 20478K, 47% free 46795K/88196K, paused 3ms, total 3ms
12-18 23:44:20.638: D/dalvikvm(1966): GC_FOR_ALLOC freed 39K, 47% free 46799K/88196K, paused 8ms, total 8ms
12-18 23:44:20.646: I/dalvikvm-heap(1966): Grow heap (frag case) to 68.812MB for 24097205-byte allocation
12-18 23:44:20.670: D/dalvikvm(1966): GC_FOR_ALLOC freed 40974K, 2% free 29357K/29836K, paused 11ms, total 11ms
12-18 23:44:20.694: D/dalvikvm(1966): GC_FOR_ALLOC freed 4K, 2% free 29360K/29836K, paused 3ms, total 3ms
12-18 23:44:20.726: I/dalvikvm-heap(1966): Grow heap (frag case) to 76.801MB for 50331660-byte allocation
12-18 23:44:20.730: D/dalvikvm(1966): GC_FOR_ALLOC freed 0K, 1% free 78513K/78992K, paused 3ms, total 3ms
12-18 23:44:20.730: I/dalvikvm-heap(1966): Forcing collection of SoftReferences for 201326604-byte allocation
12-18 23:44:20.738: D/dalvikvm(1966): GC_BEFORE_OOM freed 69K, 1% free 78443K/78992K, paused 9ms, total 9ms
12-18 23:44:20.738: E/dalvikvm-heap(1966): Out of memory on a 201326604-byte allocation.
12-18 23:44:20.738: I/dalvikvm(1966): &quot;fifo-pool-thread-0&quot; prio=5 tid=12 RUNNABLE
12-18 23:44:20.738: I/dalvikvm(1966):   | group=&quot;main&quot; sCount=0 dsCount=0 obj=0xa51056c8 self=0xb8a52078
12-18 23:44:20.738: I/dalvikvm(1966):   | sysTid=2057 nice=10 sched=3/0 cgrp=[fopen-error:2] handle=-1196952016
12-18 23:44:20.738: I/dalvikvm(1966):   | state=R schedstat=( 2201918736 628603171 6972 ) utm=106 stm=113 core=0
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.gifdecoder.GifDecoder.setData(GifDecoder.java:~381)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decodeFirstFrame(GifResourceDecoder.java:89)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:75)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:61)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:1)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeGifWrapper(GifBitmapWrapperResourceDecoder.java:101)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:87)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:1)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:189)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:176)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:127)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.lang.Thread.run(Thread.java:841)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:53)"><pre class="notranslate"><code class="notranslate">12-18 23:44:05.602: D/dalvikvm(1966): VFY: replacing opcode 0x6e at 0x000a
12-18 23:44:05.670: D/dalvikvm(1966): GC_FOR_ALLOC freed 290K, 8% free 5596K/6020K, paused 3ms, total 4ms
12-18 23:44:06.294: D/dalvikvm(1966): GC_FOR_ALLOC freed 321K, 8% free 5750K/6208K, paused 2ms, total 3ms
12-18 23:44:06.298: D/dalvikvm(1966): GC_FOR_ALLOC freed 21K, 8% free 5875K/6356K, paused 3ms, total 3ms
12-18 23:44:06.386: D/dalvikvm(1966): GC_FOR_ALLOC freed 38K, 9% free 5915K/6436K, paused 4ms, total 4ms
12-18 23:44:06.386: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.059MB for 162024-byte allocation
12-18 23:44:06.390: D/dalvikvm(1966): GC_FOR_ALLOC freed 78K, 10% free 5995K/6596K, paused 3ms, total 3ms
12-18 23:44:06.494: D/dalvikvm(1966): GC_FOR_ALLOC freed &lt;1K, 10% free 5995K/6596K, paused 4ms, total 4ms
12-18 23:44:06.494: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.293MB for 325864-byte allocation
12-18 23:44:06.498: D/dalvikvm(1966): GC_FOR_ALLOC freed 158K, 12% free 6155K/6916K, paused 6ms, total 6ms
12-18 23:44:06.610: D/dalvikvm(1966): GC_FOR_ALLOC freed 1K, 12% free 6155K/6916K, paused 2ms, total 2ms
12-18 23:44:06.638: I/dalvikvm-heap(1966): Grow heap (frag case) to 6.762MB for 653544-byte allocation
12-18 23:44:06.650: D/dalvikvm(1966): GC_FOR_ALLOC freed 318K, 15% free 6475K/7556K, paused 11ms, total 11ms
12-18 23:44:06.754: D/dalvikvm(1966): GC_FOR_ALLOC freed 4K, 15% free 6475K/7556K, paused 2ms, total 2ms
12-18 23:44:06.758: I/dalvikvm-heap(1966): Grow heap (frag case) to 7.700MB for 1308904-byte allocation
12-18 23:44:06.762: D/dalvikvm(1966): GC_FOR_ALLOC freed 638K, 20% free 7115K/8836K, paused 3ms, total 3ms
12-18 23:44:06.894: D/dalvikvm(1966): GC_FOR_ALLOC freed 8K, 20% free 7115K/8836K, paused 2ms, total 2ms
12-18 23:44:06.898: I/dalvikvm-heap(1966): Grow heap (frag case) to 9.575MB for 2619624-byte allocation
12-18 23:44:06.902: D/dalvikvm(1966): GC_FOR_ALLOC freed 1278K, 27% free 8395K/11396K, paused 3ms, total 3ms
12-18 23:44:07.662: D/dalvikvm(1966): GC_FOR_ALLOC freed 17K, 27% free 8395K/11396K, paused 9ms, total 9ms
12-18 23:44:07.678: I/dalvikvm-heap(1966): Grow heap (frag case) to 13.325MB for 5241064-byte allocation
12-18 23:44:07.690: D/dalvikvm(1966): GC_FOR_ALLOC freed 2558K, 34% free 10955K/16516K, paused 7ms, total 7ms
12-18 23:44:09.762: D/dalvikvm(1966): GC_FOR_ALLOC freed 33K, 34% free 10955K/16516K, paused 8ms, total 8ms
12-18 23:44:09.798: I/dalvikvm-heap(1966): Grow heap (frag case) to 20.825MB for 10483944-byte allocation
12-18 23:44:09.806: D/dalvikvm(1966): GC_FOR_ALLOC freed 5118K, 40% free 16075K/26756K, paused 5ms, total 5ms
12-18 23:44:14.278: D/dalvikvm(1966): GC_FOR_ALLOC freed 64K, 40% free 16075K/26756K, paused 11ms, total 11ms
12-18 23:44:14.334: I/dalvikvm-heap(1966): Grow heap (frag case) to 35.825MB for 20969704-byte allocation
12-18 23:44:14.342: D/dalvikvm(1966): GC_FOR_ALLOC freed 10238K, 45% free 26315K/47236K, paused 4ms, total 4ms
12-18 23:44:19.198: D/dalvikvm(1966): GC_FOR_ALLOC freed 124K, 45% free 26315K/47236K, paused 11ms, total 12ms
12-18 23:44:19.274: I/dalvikvm-heap(1966): Grow heap (frag case) to 65.825MB for 41941224-byte allocation
12-18 23:44:19.286: D/dalvikvm(1966): GC_FOR_ALLOC freed 20478K, 47% free 46795K/88196K, paused 3ms, total 3ms
12-18 23:44:20.638: D/dalvikvm(1966): GC_FOR_ALLOC freed 39K, 47% free 46799K/88196K, paused 8ms, total 8ms
12-18 23:44:20.646: I/dalvikvm-heap(1966): Grow heap (frag case) to 68.812MB for 24097205-byte allocation
12-18 23:44:20.670: D/dalvikvm(1966): GC_FOR_ALLOC freed 40974K, 2% free 29357K/29836K, paused 11ms, total 11ms
12-18 23:44:20.694: D/dalvikvm(1966): GC_FOR_ALLOC freed 4K, 2% free 29360K/29836K, paused 3ms, total 3ms
12-18 23:44:20.726: I/dalvikvm-heap(1966): Grow heap (frag case) to 76.801MB for 50331660-byte allocation
12-18 23:44:20.730: D/dalvikvm(1966): GC_FOR_ALLOC freed 0K, 1% free 78513K/78992K, paused 3ms, total 3ms
12-18 23:44:20.730: I/dalvikvm-heap(1966): Forcing collection of SoftReferences for 201326604-byte allocation
12-18 23:44:20.738: D/dalvikvm(1966): GC_BEFORE_OOM freed 69K, 1% free 78443K/78992K, paused 9ms, total 9ms
12-18 23:44:20.738: E/dalvikvm-heap(1966): Out of memory on a 201326604-byte allocation.
12-18 23:44:20.738: I/dalvikvm(1966): "fifo-pool-thread-0" prio=5 tid=12 RUNNABLE
12-18 23:44:20.738: I/dalvikvm(1966):   | group="main" sCount=0 dsCount=0 obj=0xa51056c8 self=0xb8a52078
12-18 23:44:20.738: I/dalvikvm(1966):   | sysTid=2057 nice=10 sched=3/0 cgrp=[fopen-error:2] handle=-1196952016
12-18 23:44:20.738: I/dalvikvm(1966):   | state=R schedstat=( 2201918736 628603171 6972 ) utm=106 stm=113 core=0
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.gifdecoder.GifDecoder.setData(GifDecoder.java:~381)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decodeFirstFrame(GifResourceDecoder.java:89)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:75)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:61)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:1)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeGifWrapper(GifBitmapWrapperResourceDecoder.java:101)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:87)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:1)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:189)
12-18 23:44:20.738: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:176)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:127)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:122)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:101)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-18 23:44:20.742: I/dalvikvm(1966):   at java.lang.Thread.run(Thread.java:841)
12-18 23:44:20.742: I/dalvikvm(1966):   at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:53)
</code></pre></div>
<p dir="auto">This is my code :</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(this)
.load(&quot;https://farm8.staticflickr.com/7489/15428306664_6903c2f82d_o.gif&quot;)
.into(img);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-smi">this</span>)
.<span class="pl-en">load</span>(<span class="pl-s">"https://farm8.staticflickr.com/7489/15428306664_6903c2f82d_o.gif"</span>)
.<span class="pl-en">into</span>(<span class="pl-s1">img</span>);</pre></div>
<p dir="auto">You can see heap dump file <a href="https://www.dropbox.com/s/4nqsbmgfg09xm26/glide_oop_gif.hprof?dl=0" rel="nofollow">at here</a></p>
<p dir="auto">See this stacktrace , I understand my application has leak memory when I trying load a large GIF image,but i don't find the reason:(.Please help me resolve it.Thanks you.</p>
<p dir="auto">A 3840x2880 example is <a href="http://media4.giphy.com/media/ToMjGpquWkOQon5nAvS/giphy.gif" rel="nofollow">http://media4.giphy.com/media/ToMjGpquWkOQon5nAvS/giphy.gif</a>.</p>
<p dir="auto">Probably the most reasonable thing is to catch the exception, allow the load to fail,  and encourage users to not try to load gigantic gifs, but we may also be able to find some reasonable way of downsampling GIFs the same way we do Bitmaps.</p>