<p dir="auto">I am new to Glide, i started to use it today because the support for Gif.<br>
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.<br>
Any idea how to solve this, Thannks a lot.</p>
<p dir="auto">These are where and how i used Glide:</p>
<p dir="auto">Code in the adapter:<br>
Glide.with(Application.getInstance()).load(url).into(threeImagesHolder.image0);</p>
<p dir="auto">Code int the layout file:<br>
</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    &lt;ImageView
        android:id=&quot;@+id/iv_image0&quot;
        android:layout_width=&quot;100dp&quot;
        android:layout_height=&quot;100dp&quot;
        android:layout_gravity=&quot;center_vertical&quot;
        android:layout_marginRight=&quot;3dp&quot;
        android:background=&quot;@drawable/img_holder_bg&quot;
        android:scaleType=&quot;centerCrop&quot; /&gt;

    &lt;ImageView
        android:id=&quot;@+id/iv_image1&quot;
        android:layout_width=&quot;100dp&quot;
        android:layout_height=&quot;100dp&quot;
        android:layout_gravity=&quot;center_vertical&quot;
        android:layout_marginRight=&quot;3dp&quot;
        android:background=&quot;@drawable/img_holder_bg&quot;
        android:scaleType=&quot;centerCrop&quot; /&gt;

    &lt;ImageView
        android:id=&quot;@+id/iv_image2&quot;
        android:layout_width=&quot;100dp&quot;
        android:layout_height=&quot;100dp&quot;
        android:layout_gravity=&quot;center_vertical&quot;
        android:background=&quot;@drawable/img_holder_bg&quot;
        android:scaleType=&quot;centerCrop&quot; /&gt;
&lt;/LinearLayout&gt;"><pre class="notranslate"><code class="notranslate">    &lt;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" /&gt;

    &lt;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" /&gt;

    &lt;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" /&gt;
&lt;/LinearLayout&gt;
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2045717/5427468/d2a41cde-83d8-11e4-9d46-aa0677c35e6f.png"><img src="https://cloud.githubusercontent.com/assets/2045717/5427468/d2a41cde-83d8-11e4-9d46-aa0677c35e6f.png" alt="qq 20141214212925" style="max-width: 100%;"></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.IndexOutOfBoundsException: index=6, limit=6, size of type=2
    at java.nio.Buffer.checkIndex(Buffer.java:165)
    at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:203)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$RandomAccessReader.getInt16(ImageHeaderParser.java:315)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.parseExifSegment(ImageHeaderParser.java:199)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.getOrientation(ImageHeaderParser.java:140)
    at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:116)"><pre class="notranslate"><code class="notranslate">java.lang.IndexOutOfBoundsException: index=6, limit=6, size of type=2
    at java.nio.Buffer.checkIndex(Buffer.java:165)
    at java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:203)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$RandomAccessReader.getInt16(ImageHeaderParser.java:315)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.parseExifSegment(ImageHeaderParser.java:199)
    at com.bumptech.glide.load.resource.bitmap.ImageHeaderParser.getOrientation(ImageHeaderParser.java:140)
    at com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:116)
</code></pre></div>
<p dir="auto">Because of the exif data is only 6 bytes which equals to jpeg preamble.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/476886/5317120/c70b59e8-7cce-11e4-9d8c-ae5481233b28.JPG"><img src="https://cloud.githubusercontent.com/assets/476886/5317120/c70b59e8-7cce-11e4-9d8c-ae5481233b28.JPG" alt="1" style="max-width: 100%;"></a></p>
<p dir="auto">Perhaps we can use the Throwable instead of IOException to ignore it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="try {
    orientation = new ImageHeaderParser(stream).getOrientation();
} catch (IOException Throwable e) {
    if (Log.isLoggable(TAG, Log.WARN)) {
        Log.w(TAG, &quot;Cannot determine the image orientation from header&quot;, e);
    }
}"><pre class="notranslate"><code class="notranslate">try {
    orientation = new ImageHeaderParser(stream).getOrientation();
} catch (IOException Throwable e) {
    if (Log.isLoggable(TAG, Log.WARN)) {
        Log.w(TAG, "Cannot determine the image orientation from header", e);
    }
}
</code></pre></div>