ANR: com.bumptech.glide.request.BaseRequestOptions.clone #5445
Open
Description
Glide Version:
4.16.0
Integration libraries:
N/A
Device/Android Version:
Android TV/Android 12
Issue details / Repro steps / Use case background:
No direct reproduction but reported by PlayStore vitals. It appears to be a lock contention issue in com.bumptech.glide.RequestManager.onStart
where com.bumptech.glide.RequestManager.<init>
is still holding a lock. This causes an ANR to occur as RequestManager.onStart()
runs on the main thread.
Glide load line / GlideModule
(if any) / list Adapter code (if any):
Glide.with(this) // this is a LinearLayout/LifecycleObserver
.asGif()
.load(R.drawable.loadingboxlooptt)
.into(findViewById(R.id.loadingDots))
.clearOnDetach()
Layout XML:
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:parentTag="android.widget.LinearLayout">
<ImageView
android:id="@+id/loadingDots"
android:layout_width="wrap_content"
android:layout_height="@dimen/loading_dots_height"
android:layout_marginTop="@dimen/loading_inter_spacing"
android:contentDescription="@string/loading_text"
android:src="@drawable/loadingboxlooptt"/>
</merge>
Stack trace / LogCat:
"main" tid=1 Blocked
at com.bumptech.glide.RequestManager.onStart (RequestManager.java)
at com.bumptech.glide.manager.ApplicationLifecycle.addListener (ApplicationLifecycle.java)
at com.bumptech.glide.load.engine.ActiveResources$2.run (ActiveResources.java)
at android.os.Handler.handleCallback (Handler.java:938)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:201)
at android.os.Looper.loop (Looper.java:288)
at android.app.ActivityThread.main (ActivityThread.java:7839)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1006)
"glide-source-thread-0" tid=58 Runnable
at androidx.collection.ArraySet$1.colGetSize (ArraySet.java)
at androidx.collection.MapCollections$MapIterator.<init> (MapCollections.java)
at androidx.collection.MapCollections$KeySet.iterator (MapCollections.java)
at androidx.collection.ArrayMap.putAll (ArrayMap.java)
at com.bumptech.glide.request.BaseRequestOptions.clone (BaseRequestOptions.java)
at com.bumptech.glide.RequestManager.<init> (RequestManager.java)
at com.bumptech.glide.manager.RequestManagerRetriever.get (RequestManagerRetriever.java)
at com.bumptech.glide.load.resource.gif.GifFrameLoader.<init> (GifFrameLoader.java)
at com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder.decode (ByteBufferGifDecoder.java)
at com.bumptech.glide.load.resource.gif.ByteBufferGifDecoder.decode (ByteBufferGifDecoder.java)
at com.bumptech.glide.load.resource.gif.StreamGifDecoder.decode (StreamGifDecoder.java)
at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList (DecodePath.java)
at com.bumptech.glide.load.engine.DecodePath.decode (DecodePath.java)
at com.bumptech.glide.load.engine.LoadPath.load (LoadPath.java)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher (DecodeJob.java)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData (DecodeJob.java)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData (DecodeJob.java)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady (DecodeJob.java)
at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady (SourceGenerator.java)
at com.bumptech.glide.load.model.DirectResourceLoader$ResourceDataFetcher.loadData (DirectResourceLoader.java)
at com.bumptech.glide.load.engine.SourceGenerator.startNext (SourceGenerator.java)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators (DecodeJob.java)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped (DecodeJob.java)
at com.bumptech.glide.load.engine.DecodeJob.run (DecodeJob.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run (GlideExecutor.java)
Metadata
Assignees
Labels
No labels