bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.59k stars 6.12k forks source link

java.util.concurrent.ExecutionException #1106

Closed PauliusRaskevicius closed 8 years ago

PauliusRaskevicius commented 8 years ago

Glide Version: 3.7.0

Integration libraries: OkHttp, v2.7.4

Device/Android Version: Equal distribution among all devices and Android versions

Issue details / Repro steps / Use case background:

Stack trace:

java.util.concurrent.ExecutionException
       at com.bumptech.glide.request.RequestFutureTarget.doGet(RequestFutureTarget.java:189)
       at com.bumptech.glide.request.RequestFutureTarget.get(RequestFutureTarget.java:100)
       at com.vinted.shared.image.VintedImageLoader$1.run(VintedImageLoader.java:61)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

You can find loads of other relevant info here: http://crashes.to/s/f039183c34f

Unfortunately I can't provide screenshots or screen recording, because we're not really sure what this error means and what it impacts. Has anyone had something similar or knows what it means? We're trying to find out what visible impact this error has for our users.

sjudd commented 8 years ago

Futures throw ExecutionExceptions when the corresponding request throws an exception. Some part of Glide's load process fails and throws an exception, which triggers the ExecutionException.

Some errors are expected (I/O due to invalid image data, or flaky networks in particular), some are not. You'd need to inspect or log the ExecutionExceptions to determine their cause and whether or not they're expected.

TWiStErRob commented 8 years ago

The stack trace seems to point to this code:

        } else if (exceptionReceived) {
            throw new ExecutionException(exception);

Which means that this stack trace should have a "Caused by". Lacking that it seems that exception is received, but it is null. This usually means that you called load(null).

The effect is based on what you do with this in VintedImageLoader.

TWiStErRob commented 8 years ago

It can also mean that the decoder returned null, but with the built-in ones it's highly unlikely, check if it's possible that your model is null. For more on this see https://github.com/bumptech/glide/issues/859#issuecomment-173612899

PauliusRaskevicius commented 8 years ago

Thank you for your help guys. Turns out we weren't using Glide.clear(target)

TWiStErRob commented 8 years ago

Can you please explain it in more detail? I'm not sure I understand, and it may be helpful if someone finds this in the future.

IbraTq commented 7 years ago

Hi, i have same issue But after read your comment, still cannot understand how to fix this. Please explain it in more detail .