bumptech / glide

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

StateVerifier - Fatal Exception: java.lang.IllegalStateException: Already released #5453

Open satyajeet4047 opened 1 month ago

satyajeet4047 commented 1 month ago

Glide Version: 4.16.0

Integration libraries: OkHttp, WebP decoder

Device/Android Version: Across multiple Device / OS versions.

Screenshot 2024-10-03 at 10 37 32 AM

Issue details / Repro steps / Use case background: This issue is randomly happening in 1 : 1 manner across multiple screens. We are unable to reproduce this internally.

Glide load line / GlideModule (if any) / list Adapter code (if any):

Glide.with...

Layout XML:

<FrameLayout xmlns:android="...

Stack trace / LogCat:

Fatal Exception: java.lang.IllegalStateException: Already released
       at com.bumptech.glide.util.pool.StateVerifier$DefaultStateVerifier.throwIfRecycled(StateVerifier.java:40)
       at com.bumptech.glide.load.engine.EngineJob.addCallback(EngineJob.java:136)
       at com.bumptech.glide.load.engine.Engine.waitForExistingOrStartNewJob(Engine.java:250)
       at com.bumptech.glide.load.engine.Engine.load(Engine.java:193)
       at com.bumptech.glide.request.SingleRequest.onSizeReady(SingleRequest.java:468)
       at com.bumptech.glide.request.target.CustomTarget.getSize(CustomTarget.java:108)
       at com.bumptech.glide.request.SingleRequest.begin(SingleRequest.java:258)
       at com.bumptech.glide.manager.RequestTracker.restartRequests(RequestTracker.java:141)
       at com.bumptech.glide.RequestManager$RequestManagerConnectivityListener.onConnectivityChanged(RequestManager.java:744)
       at com.bumptech.glide.manager.SingletonConnectivityReceiver$2.onConnectivityChanged(SingletonConnectivityReceiver.java:80)
       at com.bumptech.glide.manager.SingletonConnectivityReceiver$FrameworkConnectivityMonitorPostApi24$1.onConnectivityChange(SingletonConnectivityReceiver.java:174)
       at com.bumptech.glide.manager.SingletonConnectivityReceiver$FrameworkConnectivityMonitorPostApi24$1$1.run(SingletonConnectivityReceiver.java:161)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:263)
       at android.app.ActivityThread.main(ActivityThread.java:8299)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
dhruvkaushal11 commented 1 month ago

We are also facing the exact same issue on production but unable to reproduce at our end.