java.lang.RuntimeException: Failed to pin Bitmap
Hello,
I'm currently developing a news application where article teaser images are loaded in RecyclerView. For some pictures Fresco is returning an error - java.lang.RuntimeException: Failed to pin Bitmap (Images linked with this error can't be displayed also outside the RecyclerView, it's not widget-specific)
This happens only for few images, like - http://i.imgur.com/AekhHyC.jpg, Only on Android API 16, Only on some devices like - Sony LT22i or Samsung Galaxy S2 (4.1.1) Genymotion emulator
I'm attaching log for Fresco and looking forward for any feedback.
01-27 14:51:00.781 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 0 -> 2: initialize
01-27 14:51:00.785 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 2: setHierarchy: null
01-27 14:51:00.785 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 2: setHierarchy: com.facebook.drawee.generic.GenericDraweeHierarchy@53583b80
01-27 14:51:00.785 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 2: onAttach: request needs submit
01-27 14:51:00.785 26981-26981/xxx V/unknown:PipelineDraweeController: controller 53a1c26c: getDataSource
01-27 14:51:00.785 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593778: onRequestSubmit: {requestId: 2, callerContext: null, isPrefetch: false}
01-27 14:51:00.785 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593778: onProducerStart: {requestId: 2, producer: BitmapMemoryCacheGetProducer}
01-27 14:51:00.785 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593778: onProducerFinishWithSuccess: {requestId: 2, producer: BitmapMemoryCacheGetProducer, elapsedTime: 0 ms, extraMap: {cached_value_found=false}}
01-27 14:51:00.785 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593778: onProducerStart: {requestId: 2, producer: BackgroundThreadHandoffProducer}
01-27 14:51:00.785 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 2: submitRequest: dataSource: 535ab5a8
01-27 14:51:00.785 26981-27420/xxx V/unknown:RequestLoggingListener: time 23593778: onProducerFinishWithSuccess: {requestId: 2, producer: BackgroundThreadHandoffProducer, elapsedTime: 0 ms, extraMap: null}
01-27 14:51:00.793 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593784: onRequestCancellation: {requestId: 1, elapsedTime: 517 ms}
01-27 14:51:00.797 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 1 -> 3: initialize
01-27 14:51:00.797 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 3: setHierarchy: null
01-27 14:51:00.797 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 3: setHierarchy: com.facebook.drawee.generic.GenericDraweeHierarchy@53591798
01-27 14:51:00.797 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 3: onAttach: request needs submit
01-27 14:51:00.797 26981-26981/xxx V/unknown:PipelineDraweeController: controller 53a1e144: getDataSource
01-27 14:51:00.797 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593791: onRequestSubmit: {requestId: 3, callerContext: null, isPrefetch: false}
01-27 14:51:00.797 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593791: onProducerStart: {requestId: 3, producer: BitmapMemoryCacheGetProducer}
01-27 14:51:00.797 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593791: onProducerFinishWithSuccess: {requestId: 3, producer: BitmapMemoryCacheGetProducer, elapsedTime: 0 ms, extraMap: {cached_value_found=false}}
01-27 14:51:00.801 26981-26981/xxx V/unknown:RequestLoggingListener: time 23593793: onProducerStart: {requestId: 3, producer: BackgroundThreadHandoffProducer}
01-27 14:51:00.801 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 3: submitRequest: dataSource: 539bd9f0
01-27 14:51:00.801 26981-27420/xxx V/unknown:RequestLoggingListener: time 23593793: onProducerFinishWithSuccess: {requestId: 3, producer: BackgroundThreadHandoffProducer, elapsedTime: 0 ms, extraMap: null}
01-27 14:51:00.817 26981-26981/xxx D/OpenGLRenderer: TextureCache::get: create texture(0xb7b16fe8): name, size, mSize = 158, 540, 3142440
01-27 14:51:00.893 26981-27422/xxx D/dalvikvm: Trying to load lib /data/data/xxx/lib/libmemchunk.so 0xa6a100b0
01-27 14:51:00.893 26981-27422/xxx D/dalvikvm: Added shared lib /data/data/xxx/lib/libmemchunk.so 0xa6a100b0
01-27 14:51:00.897 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 1024); Free = (0, 0)
01-27 14:51:00.897 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (5355a918, 1024)
01-27 14:51:00.897 26981-27422/xxx V/unknown:GenericByteArrayPool: Used = (1, 16384); Free = (0, 0)
01-27 14:51:00.897 26981-27422/xxx V/unknown:GenericByteArrayPool: get (alloc) (object, size) = (5364981c, 16384)
01-27 14:51:00.901 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (2, 17408); Free = (0, 0)
01-27 14:51:00.901 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (5357f718, 16384)
01-27 14:51:00.901 26981-27422/xxx V/unknown:NativeMemoryChunkPool: release (reuse) (object, size) = (5355a918, 1024)
01-27 14:51:00.901 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 16384); Free = (1, 1024)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (2, 49152); Free = (1, 1024)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (535b4e2c, 32768)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: release (reuse) (object, size) = (5357f718, 16384)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 32768); Free = (2, 17408)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (2, 98304); Free = (2, 17408)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (53975738, 65536)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: release (reuse) (object, size) = (535b4e2c, 32768)
01-27 14:51:00.941 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 65536); Free = (3, 50176)
01-27 14:51:00.977 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (2, 196608); Free = (3, 50176)
01-27 14:51:00.977 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (5399410c, 131072)
01-27 14:51:00.981 26981-27422/xxx V/unknown:NativeMemoryChunkPool: release (reuse) (object, size) = (53975738, 65536)
01-27 14:51:00.981 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 131072); Free = (4, 115712)
01-27 14:51:01.033 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (2, 393216); Free = (4, 115712)
01-27 14:51:01.033 26981-27422/xxx V/unknown:NativeMemoryChunkPool: get (alloc) (object, size) = (5396cfc0, 262144)
01-27 14:51:01.033 26981-27422/xxx V/unknown:NativeMemoryChunkPool: release (reuse) (object, size) = (5399410c, 131072)
01-27 14:51:01.033 26981-27422/xxx V/unknown:NativeMemoryChunkPool: Used = (1, 262144); Free = (5, 246784)
01-27 14:51:01.057 26981-27422/xxx V/unknown:RequestLoggingListener: time 23594051: onProducerFinishWithSuccess: {requestId: 0, producer: NetworkFetchProducer, elapsedTime: 772 ms, extraMap: null}
01-27 14:51:01.061 26981-27422/xxx I/dalvikvm: Could not find method android.graphics.Bitmap.getAllocationByteCount, referenced from method com.facebook.imageutils.BitmapUtil.getSizeInBytes
01-27 14:51:01.061 26981-27422/xxx W/dalvikvm: VFY: unable to resolve virtual method 626: Landroid/graphics/Bitmap;.getAllocationByteCount ()I
01-27 14:51:01.061 26981-27422/xxx D/dalvikvm: VFY: replacing opcode 0x6e at 0x000a
01-27 14:51:01.065 26981-27422/xxx I/unknown:TiffUtil: Unsupported orientation
01-27 14:51:01.065 26981-27422/xxx V/unknown:StagingArea: Count = 1
01-27 14:51:01.065 26981-27444/xxx V/unknown:BufferedDiskCache: About to write to disk-cache for key http://i.imgur.com/AekhHyC.jpg
01-27 14:51:01.073 26981-27422/xxx V/unknown:GenericByteArrayPool: release (reuse) (object, size) = (5364981c, 16384)
01-27 14:51:01.073 26981-27422/xxx V/unknown:GenericByteArrayPool: Used = (0, 0); Free = (1, 16384)
01-27 14:51:01.077 26981-27445/xxx V/unknown:RequestLoggingListener: time 23594070: onProducerStart: {requestId: 0, producer: DecodeProducer}
01-27 14:51:01.085 26981-27445/xxx V/unknown:SoftRefByteArrayPool: Used = (1, 262144); Free = (0, 0)
01-27 14:51:01.085 26981-27445/xxx V/unknown:SoftRefByteArrayPool: get (alloc) (object, size) = (538c297c, 262144)
01-27 14:51:01.085 26981-27445/xxx V/unknown:SoftRefByteArrayPool: release (reuse) (object, size) = (538c297c, 262144)
01-27 14:51:01.085 26981-27445/xxx V/unknown:SoftRefByteArrayPool: Used = (0, 0); Free = (1, 262144)
01-27 14:51:01.089 26981-27445/xxx I/dalvikvm: Could not find method android.graphics.Bitmap.getAllocationByteCount, referenced from method com.facebook.imagepipeline.nativecode.Bitmaps.reconfigureBitmap
01-27 14:51:01.089 26981-27445/xxx W/dalvikvm: VFY: unable to resolve virtual method 626: Landroid/graphics/Bitmap;.getAllocationByteCount ()I
01-27 14:51:01.089 26981-27445/xxx D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000
01-27 14:51:01.089 26981-27445/xxx D/dalvikvm: Trying to load lib /data/data/xxx/lib/libbitmaps.so 0xa6a100b0
01-27 14:51:01.089 26981-27445/xxx D/dalvikvm: Added shared lib /data/data/xxx/lib/libbitmaps.so 0xa6a100b0
01-27 14:51:01.089 26981-27445/xxx W/unknown:RequestLoggingListener: time 23594082: onProducerFinishWithFailure: {requestId: 0, stage: DecodeProducer, elapsedTime: 12 ms, extraMap: {queueTime=10, imageType=DEFAULT, isFinal=true, hasGoodQuality=true}, throwable: java.lang.RuntimeException: Failed to pin Bitmap}
01-27 14:51:01.093 26981-27444/xxx V/unknown:GenericByteArrayPool: Used = (1, 16384); Free = (0, 0)
01-27 14:51:01.093 26981-27445/xxx W/unknown:RequestLoggingListener: time 23594085: onRequestFailure: {requestId: 2, elapsedTime: 307 ms, throwable: java.lang.RuntimeException: Failed to pin Bitmap}
01-27 14:51:01.093 26981-27445/xxx W/unknown:RequestLoggingListener: time 23594085: onRequestFailure: {requestId: 3, elapsedTime: 294 ms, throwable: java.lang.RuntimeException: Failed to pin Bitmap}
01-27 14:51:01.093 26981-27444/xxx V/unknown:GenericByteArrayPool: get (reuse) (object, size) = (5364981c, 16384)
01-27 14:51:01.093 26981-27444/xxx V/unknown:GenericByteArrayPool: release (reuse) (object, size) = (5364981c, 16384)
01-27 14:51:01.097 26981-27444/xxx V/unknown:GenericByteArrayPool: Used = (0, 0); Free = (1, 16384)
01-27 14:51:01.097 26981-27444/xxx V/unknown:BufferedDiskCache: Successful disk-cache write for key http://i.imgur.com/AekhHyC.jpg
01-27 14:51:01.097 26981-27444/xxx V/unknown:StagingArea: Count = 0
01-27 14:51:01.177 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1c26c 2: final_failed @ onFailure: failure: java.lang.RuntimeException: Failed to pin Bitmap
01-27 14:51:01.177 26981-26981/xxx V/unknown:AbstractDraweeController: controller 53a1e144 3: final_failed @ onFailure: failure: java.lang.RuntimeException: Failed to pin Bitmap
@plamenko Any news on this bug?
I am having a similar issue. Trying to display a webp image of size 128x128 but it does not show up and the error is Failed to pin Bitmap. Is there any update on this bug?
Hmm, looks like a build issue.
01-27 14:51:01.061 26981-27422/xxx W/dalvikvm: VFY: unable to resolve virtual method 626: Landroid/graphics/Bitmap;.getAllocationByteCount ()
Same here
Merging with #1862