NullPointerException: java.util.Collections$UnmodifiableCollection.<init>(Collections.java:1073)
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: 4.16.0
**Integration libraries**: okHttp3-4.11.0
**Device/Android Version**: tablet, version 12
**Issue details / Repro steps / Use case background**:
**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
```java
Glide.with(fragment instance).load(background res id).into(CustomViewTargetImp(this))
class CustomViewTargetImp(view: FrameLayout) : CustomViewTarget(view) {
override fun onLoadFailed(errorDrawable: Drawable?) {
}
override fun onResourceCleared(placeholder: Drawable?) {
}
override fun onResourceReady(resource: Drawable, transition: Transition?) {
view.background = resource
}
}
```
**Layout XML**:
```xml
```
**Stack trace / LogCat**:
```ruby
java.lang.ExceptionInInitializerError
at com.bumptech.glide.Glide.(Glide.java:415)
at com.bumptech.glide.GlideBuilder.build(GlideBuilder.java:563)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:314)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:266)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:210)
at com.bumptech.glide.Glide.get(Glide.java:191)
at com.bumptech.glide.Glide.getRetriever(Glide.java:774)
at com.bumptech.glide.Glide.with(Glide.java:838)
at com.xx.xxFragment$initElements$1.invokeSuspend(SubjectFragment.kt:71)
at com.xx.xxFragment$initElements$1.invoke(Unknown Source:8)
at com.xx.xxFragment$initElements$1.invoke(Unknown Source:2)
at com.zuoyebang.iot.pad.launcher.LauncherExtKt$delaySuspendThings$1.invokeSuspend(LauncherExt.kt:448)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:234)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:518)
at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:19)
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:7881)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@83ac131, Dispatchers.Main]
Caused by: java.lang.NullPointerException
at java.util.Collections$UnmodifiableCollection.(Collections.java:1073)
at java.util.Collections$UnmodifiableSet.(Collections.java:1175)
at java.util.Collections.unmodifiableSet(Collections.java:1165)
at com.bumptech.glide.load.resource.bitmap.Downsampler.(Downsampler.java:130)
at com.bumptech.glide.Glide.(Glide.java:415)
at com.bumptech.glide.GlideBuilder.build(GlideBuilder.java:563)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:314)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:266)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:210)
at com.bumptech.glide.Glide.get(Glide.java:191)
at com.bumptech.glide.Glide.getRetriever(Glide.java:774)
at com.bumptech.glide.Glide.with(Glide.java:838)
at com.xx.xxFragment$initElements$1.invokeSuspend(SubjectFragment.kt:71)
at com.xx.xxFragment$initElements$1.invoke(Unknown Source:8)
at com.xx.xxFragment$initElements$1.invoke(Unknown Source:2)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:234)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:518)
at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:19)
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:7881)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
```
Contributor guide
Assessment
This issue has not been assessed yet.