java.lang.IllegalStateException when load gif
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: 4.2
**Integration libraries**: okhttp3 3.8.1
**Device/Android Version**: Android 4.4
**Issue details / Repro steps / Use case background**:
from our collected online crash log, there are some crash in Glide library when load gif images. I trace the sourece and cannot found the suspects. Have some idea on this issue?
**Stack trace / LogCat**:
```ruby
java.lang.IllegalStateException: You can't start or clear loads in RequestListener or Target callbacks. If you must do so, consider posting your into() or clear() calls to the main thread using a Handler instead.
at com.bumptech.glide.request.SingleRequest.assertNotCallingCallbacks(SourceFile:279)
at com.bumptech.glide.request.SingleRequest.begin(SourceFile:208)
at com.bumptech.glide.manager.RequestTracker.runRequest(SourceFile:39)
at com.bumptech.glide.RequestManager.track(SourceFile:454)
at com.bumptech.glide.RequestBuilder.into(SourceFile:382)
at com.bumptech.glide.RequestBuilder.into(SourceFile:354)
at com.bumptech.glide.load.resource.gif.GifFrameLoader.loadNextFrame(SourceFile:208)
at com.bumptech.glide.load.resource.gif.GifFrameLoader.onFrameReady(SourceFile:246)
at com.bumptech.glide.load.resource.gif.GifFrameLoader$FrameLoaderCallback.handleMessage(SourceFile:260)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5281)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:932)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:748)
at dalvik.system.NativeStart.main(Native Method)
```
Contributor guide
Assessment
This issue has not been assessed yet.