You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MemoryCacheUtil. findCacheKeysForImageUri methods iterate over a synchronized list without obtaining the lock to synchronize on the synchronized list. Per http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Collections.html#synchronizedList(java.util.List) you have to synchronize on the list when you iterate the items. This also seems to apply to getKeys which is used in these methods. I've hit an exception a few dozen times in testing where this caused a crash.
An option for a fix would be to copy the keys to an immutable collection before iteration. I cannot submit a patch at the moment, but would be happy to in a week or so if no one can tackle it before then.
The text was updated successfully, but these errors were encountered:
The MemoryCacheUtil. findCacheKeysForImageUri methods iterate over a synchronized list without obtaining the lock to synchronize on the synchronized list. Per http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Collections.html#synchronizedList(java.util.List) you have to synchronize on the list when you iterate the items. This also seems to apply to getKeys which is used in these methods. I've hit an exception a few dozen times in testing where this caused a crash.
An option for a fix would be to copy the keys to an immutable collection before iteration. I cannot submit a patch at the moment, but would be happy to in a week or so if no one can tackle it before then.
The text was updated successfully, but these errors were encountered: