Can't load image from net on 4.7.1
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide 4.7.1**
**Device**: Xiaomi 5A
I couldn't reproduce it in clean environment - I've got a list, in which I load url. If I use hardcoded url, it works, If I use Glide 4.4.0 (as mentioned in [issue #2824:](https://github.com/bumptech/glide/issues/2824)) it works. But if I use dynamic url on 4.7.1, it throws exception.
**Glide load line**:
```java
Timber.w("binding image: '%s'", image);
Glide.with(binding.bgImage)
.load(image.trim())//not working (tried with/without trim())
// .load("https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_bravo-online.jpg")//working
.into(binding.bgImage);
```
**Layout XML**:
```xml
```
**Stack trace / LogCat**:
```ruby
BalanceViewHolder: binding image: 'https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_status-bonusi-news.jpg'
W/Glide: Load failed for https://ms-dev.beeline.uz/binaries/content/gallery/mainsite/backgrounds-all/1200x600_status-bonusi-news.jpg with size [656x320]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.lang.IndexOutOfBoundsException(Index: 0, Size: 0)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
08-03 11:36:31.228 5804-5804/uz.beeline.my I/Glide: Root cause (1 of 1)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:411)
at java.util.Collections$UnmodifiableList.get(Collections.java:1295)
at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:71)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
```
Contributor guide
Assessment
This issue has not been assessed yet.