Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloaded images are not displayed #292

Closed
zourb opened this issue Dec 14, 2014 · 6 comments
Closed

Downloaded images are not displayed #292

zourb opened this issue Dec 14, 2014 · 6 comments
Labels

Comments

@zourb
Copy link

zourb commented Dec 14, 2014

I am new to Glide, i started to use it today because the support for Gif.
but some images were not displayed int the list(see the attachment), which got 200 http code while captured by Fiddler, while displayed well when using Picasso.
Any idea how to solve this, Thannks a lot.

These are where and how i used Glide:

Code in the adapter:
Glide.with(Application.getInstance()).load(url).into(threeImagesHolder.image0);

Code int the layout file:

    <ImageView
        android:id="@+id/iv_image0"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_gravity="center_vertical"
        android:layout_marginRight="3dp"
        android:background="@drawable/img_holder_bg"
        android:scaleType="centerCrop" />

    <ImageView
        android:id="@+id/iv_image1"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_gravity="center_vertical"
        android:layout_marginRight="3dp"
        android:background="@drawable/img_holder_bg"
        android:scaleType="centerCrop" />

    <ImageView
        android:id="@+id/iv_image2"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_gravity="center_vertical"
        android:background="@drawable/img_holder_bg"
        android:scaleType="centerCrop" />
</LinearLayout>

qq 20141214212925

@TWiStErRob
Copy link
Collaborator

Thank you for your report, welcome to the world of Glide, hope you'll find it useful!

By answering the above questions you'll help us narrow down the problem:

  1. Just to be clear: you have the same line for image1 and image2, right?
  2. Are you using the latest 3.4.0?
  3. Which Android version are you running on and what device?
  4. Is it always the same two images? If so, maybe those two have something weird going on in the GIF format which Glide doesn't like... yet! If this is the case, can you please publish those images (via url or attachment?)

Also please check out Debugging and Error Handling on the Wiki, there may be a hidden clue hiding in LogCat.

Few other tips:

  • instead of Application.getInstance() try to use the closest Fragment or Context: threeImagesHolder.image0.getContext(), this helps Glide manage resources better.
  • unrelated to images, but you can use an android:divider instead of marginRight if your target API is high enough

@zourb
Copy link
Author

zourb commented Dec 15, 2014

@TWiStErRob , thanks for your quick reply.

  1. image1 and image2 are the same line;
  2. yes, version glide-3.4.0.jar;
  3. Nexus5, Android 5.0 and Note3 SM-N9006, 4.3;
  4. Yes, always the same images, see the attachment.
    http://mmbiz.qpic.cn/mmbiz/kRqdoeNhry13gBicJuPjMQD58D4XkwIuV0Ixs1dQ8Xo52xDsGJCWzHicDgTstgwAkwYcianmn1JkbS6zicur8foSkg/640
    http://mmbiz.qpic.cn/mmbiz/kRqdoeNhry13gBicJuPjMQD58D4XkwIuVT6yfHB8DOFISTb193ZYUfu6BMhQChmEDtJZBL1gp9jwWMPrTTKZH3Q/640

data1
data2

I will get the clue hiding in LogCate later, thanks for your tips.

@zourb
Copy link
Author

zourb commented Dec 15, 2014

@TWiStErRob i found the exception stack in LogCat.
Hope it can help, thanks.
data3

@TWiStErRob
Copy link
Collaborator

Oh, they are JPEGs...
@sjudd that exif 6 bytes and Missing data in fiddler image may be connected to the exception.

@sjudd
Copy link
Collaborator

sjudd commented Dec 16, 2014

Looks like this is a duplicate of #286.

@sjudd sjudd added the bug label Dec 16, 2014
@sjudd sjudd added this to the 3.5 milestone Dec 16, 2014
@sjudd
Copy link
Collaborator

sjudd commented Dec 21, 2014

Confirmed duplicate of #286.

@sjudd sjudd closed this as completed Dec 21, 2014
@sjudd sjudd removed this from the 3.5 milestone Jan 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants