First of all; thanks for this great module! Works perfect with images. Butttt, with GIF there are still some issues, also with latest version.
We've got a listView with 20-40 GIF images. After some seconds testing, an out of memory error is generated.
I tried to add largeHeap="true" to the manifest, but no effect.
This is my console output (maybe not all part of the error, but you get the idea:
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 963(23KB) AllocSpace objects, 0(0B) LOS objects, 2%% free, 93MB/96MB, paused 204us total 10.952ms
[INFO] : art: Starting a blocking GC Alloc
[WARN] : cr_ScreenOrientation: Removing an inexistent observer!
[ERROR] : chromium: [ERROR:gles2_cmd_decoder.cc(2167)] [.CommandBufferContext.RenderCompositor-0xc0334840]GL ERROR :GL_INVALID_OPERATION : BackFramebuffer::Destroy: <- error from previous GL command
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 744(87KB) AllocSpace objects, 1(4MB) LOS objects, 6%% free, 89MB/96MB, paused 505us total 144.816ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 270(13KB) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 368us total 26.521ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 77(2480B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 399us total 27.166ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 6909008 free bytes and 6MB until OOM"
[INFO] : art: WaitForGcToComplete blocked for 83.008ms for cause Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 4(544B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 355us total 5.751ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 7(168B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 262us total 27.285ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 38(1176B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 393us total 35.050ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 16(496B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 290us total 22.315ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 6904784 free bytes and 6MB until OOM"
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 15(400B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 246us total 17.623ms
[INFO] : art: WaitForGcToComplete blocked for 112.097ms for cause Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 14(304B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 354us total 23.213ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 41(1320B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 526us total 78.072ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 18(496B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 338us total 38.550ms
[INFO] : art: Starting a blocking GC HomogeneousSpaceCompact
[INFO] : art: Waiting for a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 105MB to 96MB
[INFO] : art: HomogeneousSpaceCompact marksweep + semispace GC freed 4(96B) AllocSpace objects, 0(0B) LOS objects, 6%% free, 89MB/96MB, paused 49.731ms total 49.731ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 6909336 free bytes and 6MB until OOM"
[INFO] : art: WaitForGcToComplete blocked for 192.086ms for cause Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 320(524KB) AllocSpace objects, 2(8MB) LOS objects, 15%% free, 81MB/96MB, paused 489us total 124.324ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[WARN] : AVImageView: (main) [850,483960] https://cdn.skoften.net/images/62496/gifdump_544_2.gif: resource not loaded.
[WARN] : AVImageView: (main) [0,483960] java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 6909336 free bytes and 6MB until OOM
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 94(5KB) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 280us total 29.370ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 15311864 free bytes and 14MB until OOM"
[WARN] : AVImageView: (main) [164,484124] https://cdn.skoften.net/images/62496/gifdump_544_1.gif: resource not loaded.
[WARN] : AVImageView: (main) [0,484124] java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 15311864 free bytes and 14MB until OOM
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 7372(2MB) AllocSpace objects, 9(4MB) LOS objects, 10%% free, 85MB/96MB, paused 897us total 16.346ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 98MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 2566(99KB) AllocSpace objects, 7(12MB) LOS objects, 14%% free, 82MB/96MB, paused 4.233ms total 101.425ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 37(592B) AllocSpace objects, 0(0B) LOS objects, 14%% free, 82MB/96MB, paused 243us total 9.305ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 98MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 192(9KB) AllocSpace objects, 2(776KB) LOS objects, 14%% free, 82MB/96MB, paused 288us total 78.797ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 99MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 91(3032B) AllocSpace objects, 1(1028KB) LOS objects, 13%% free, 83MB/96MB, paused 454us total 66.894ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 13142064 free bytes and 12MB until OOM"
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[WARN] : art: Suspending all threads took: 7.013ms
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 24(1040B) AllocSpace objects, 0(0B) LOS objects, 13%% free, 83MB/96MB, paused 11.013ms total 22.080ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 99MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 114(2632B) AllocSpace objects, 0(0B) LOS objects, 13%% free, 83MB/96MB, paused 474us total 66.827ms
[INFO] : art: Starting a blocking GC Alloc
[WARN] : GifResourceDecoder: Error reading data from stream
[WARN] : GifResourceDecoder: java.io.InterruptedIOException: thread interrupted
[WARN] : GifResourceDecoder: at com.android.okhttp.okio.Timeout.throwIfReached(Timeout.java:145)
[WARN] : GifResourceDecoder: at com.android.okhttp.okio.Okio$2.read(Okio.java:133)
[WARN] : GifResourceDecoder: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
[WARN] : GifResourceDecoder: at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:50)
[WARN] : GifResourceDecoder: at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:418)
[WARN] : GifResourceDecoder: at com.android.okhttp.okio.RealBufferedSource$1.read(RealBufferedSource.java:371)
[WARN] : GifResourceDecoder: at java.io.FilterInputStream.read(FilterInputStream.java:133)
[WARN] : GifResourceDecoder: at com.bumptech.glide.util.ContentLengthInputStream.read(ContentLengthInputStream.java:65)
[WARN] : GifResourceDecoder: at com.bumptech.glide.util.ContentLengthInputStream.read(ContentLengthInputStream.java:60)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.fillbuf(RecyclableBufferedInputStream.java:132)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream.read(RecyclableBufferedInputStream.java:309)
[WARN] : GifResourceDecoder: at java.io.FilterInputStream.read(FilterInputStream.java:107)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gif.GifResourceDecoder.inputStreamToBytes(GifResourceDecoder.java:105)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:57)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gif.GifResourceDecoder.decode(GifResourceDecoder.java:26)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeGifWrapper(GifBitmapWrapperResourceDecoder.java:101)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decodeStream(GifBitmapWrapperResourceDecoder.java:87)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:71)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:61)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.resource.gifbitmap.GifBitmapWrapperResourceDecoder.decode(GifBitmapWrapperResourceDecoder.java:22)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.DecodeJob.decodeFromSourceData(DecodeJob.java:190)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.DecodeJob.decodeSource(DecodeJob.java:177)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.DecodeJob.decodeFromSource(DecodeJob.java:128)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.EngineRunnable.decodeFromSource(EngineRunnable.java:127)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.EngineRunnable.decode(EngineRunnable.java:106)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.EngineRunnable.run(EngineRunnable.java:58)
[WARN] : GifResourceDecoder: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
[WARN] : GifResourceDecoder: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
[WARN] : GifResourceDecoder: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
[WARN] : GifResourceDecoder: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
[WARN] : GifResourceDecoder: at java.lang.Thread.run(Thread.java:761)
[WARN] : GifResourceDecoder: at com.bumptech.glide.load.engine.executor.FifoPriorityThreadPoolExecutor$DefaultThreadFactory$1.run(FifoPriorityThreadPoolExecutor.java:118)
[INFO] : art: Clamp target GC heap from 104MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 1350(168KB) AllocSpace objects, 1(2MB) LOS objects, 8%% free, 88MB/96MB, paused 363us total 99.082ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 874(1462KB) AllocSpace objects, 3(6MB) LOS objects, 15%% free, 81MB/96MB, paused 774us total 88.041ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 15103648 free bytes and 14MB until OOM"
[WARN] : AVImageView: (main) [6431,490555] https://cdn.skoften.net/images/62496/gifdump_544_3.gif: resource not loaded.
[WARN] : AVImageView: (main) [0,490555] java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 15103648 free bytes and 14MB until OOM
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 1268(432KB) AllocSpace objects, 9(4MB) LOS objects, 10%% free, 85MB/96MB, paused 347us total 19.179ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 1302(50KB) AllocSpace objects, 3(12MB) LOS objects, 15%% free, 81MB/96MB, paused 300us total 28.471ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Alloc sticky concurrent mark sweep GC freed 0(0B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 1.342ms total 5.005ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 62(1880B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 306us total 29.922ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 50(1656B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 230us total 29.316ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 15276416 free bytes and 14MB until OOM"
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc partial concurrent mark sweep GC freed 15(400B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 299us total 19.571ms
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 3(72B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 193us total 22.551ms
[INFO] : art: Forcing collection of SoftReferences for 16MB allocation
[INFO] : art: Starting a blocking GC Alloc
[INFO] : art: Clamp target GC heap from 97MB to 96MB
[INFO] : art: Alloc concurrent mark sweep GC freed 33(864B) AllocSpace objects, 0(0B) LOS objects, 15%% free, 81MB/96MB, paused 1.568ms total 27.834ms
[WARN] : art: Throwing OutOfMemoryError "Failed to allocate a 16777228 byte allocation with 15271432 free bytes and 14MB until OOM"
[WARN] : AVImageView: (main) [1169,491724] https://cdn.skoften.net/images/62496/gifdump_544_1.gif: resource not loaded.
[WARN] : AVImageView: (main) [0,491724] java.lang.OutOfMemoryError: Failed to allocate a 16777228 byte allocation with 15271432 free bytes and 14MB until OOM