Open renaudcerrato opened 3 years ago
We found the reason why occur "Already released" Exception(when 2020-06-19). Here is the log:
06-19 20:17:29.860 21511 21511 I RequestTracker: resumeRequests(), start 06-19 20:17:29.865 21511 21511 I RequestTracker: clearRemoveAndMaybeRecycle(), request=com.bumptech.glide.request.SingleRequest@477f55a 06-19 20:17:29.866 21511 21511 D Request : recycle(), com.bumptech.glide.request.SingleRequest@477f55a 06-19 20:17:29.868 21511 21511 D Request : begin(), com.bumptech.glide.request.SingleRequest@477f55a
We can find it is happened in Main thread(single thread),but the execute order is : resumeRequests -> getSnapShot -> one of them run clearRemoveAndMaybeRecycle -> and then request.begin. Although we execute this in main thread, the request set is not thread safe.
Hope this can help
Glide Version: 4.11.0 and 4.12.0
Integration libraries: okhttp3-integration
Device/Android Version: Oppo/Lollipop (unable to reproduce on my Pixel / Android 10)
Repro steps: back and forth between activities and fragments. It can take a while.
Glide load line:
Stack trace / LogCat: