-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a fixed size for items in LruCache.
PiperOrigin-RevId: 303010044
- Loading branch information
1 parent
5e2ccc6
commit 5090b6d
Showing
2 changed files
with
97 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5090b6d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am currently using v4.9.0 version, but there is a problem with LRUCache.java().
In the log below, the A part of (LruCache.java:178) looks like a (trimToSize) function.
And then I found this commit that seems relevant.
Could this commit be a solution to this exception??
java.util.NoSuchElementException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:759)
at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:790)
at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:788)
at com.bumptech.glide.g.g.a(LruCache.java:178)
at com.bumptech.glide.g.g.a(LruCache.java:164)
at com.bumptech.glide.load.engine.a.g.a(LruResourceCache.java:52)
at com.bumptech.glide.c.a(Glide.java:628)
at com.bumptech.glide.c.onTrimMemory(Glide.java:841)
at android.app.Application.onTrimMemory(Application.java:306)
at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:6410)
at android.app.ActivityThread.access$1100(ActivityThread.java:269)
at android.app.ActivityThread$ApplicationThread.lambda$scheduleTrimMemory$0(ActivityThread.java:1690)
at android.app.-$$Lambda$ActivityThread$ApplicationThread$tUGFX7CUhzB4Pg5wFd5yeqOnu38.accept(Unknown Source:8)
at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:271)
at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:195)
at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:86)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:996)
at android.view.Choreographer.doCallbacks(Choreographer.java:794)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:981)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7860)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)