Search code examples
androidandroid-glideandroid-image

Glide not able to load some of images failed with exception


I have issue with image loading. Only some of the images are not loading. I have tried using glide and image loader.

Glide code :

Glide.with(context)
                .load(model.getImage4x3().trim()+"?w=430&h=275")
                .into(holder.mBinding.ivPromotion);

Glide dependency :

 implementation 'com.github.bumptech.glide:glide:4.9.0'

I have also tried : 3.9.0 , 4.0.0 , 3.6.1 , 3.8.0

Error :

load failed for http://mcms-uat.mercatus.com.sg/en/-/media/E3BE24B58E1144228C62D2364F4FF543.ashx?rev=50ebbcc572e6488c826a23276ab9bf08 with size [320x240]
    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There were 4 causes:
    java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
    java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
    java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
    java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
     call GlideException#logRootCauses(String) for more detail
      Cause (1 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Object->Drawable}, DATA_DISK_CACHE, http://mcms-uat.mercatus.com.sg/en/-/media/E3BE24B58E1144228C62D2364F4FF543.ashx?rev=50ebbcc572e6488c826a23276ab9bf08
        Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->GifDrawable->Drawable}
        Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->Drawable}
        Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->BitmapDrawable->Drawable}

Image :

http://mcms-uat.mercatus.com.sg/en/-/media/E3BE24B58E1144228C62D2364F4FF543.ashx?rev=50ebbcc572e6488c826a23276ab9bf08

Please check!


Solution

  • Thank you all of you for your Answers and suggestions. I have resolved the issue. There was problem in my URL parameter it was ?w=430&h=275 instead of &w=430&h=275. Due to this image was not cropped and issue in loading big image, so i resolved it by changing parameters