Opened 6 years ago
Last modified 6 years ago
#18534 closed defect
[Possible Patch] Some locations cause JOSM jnlp to freeze when opening the `Imagery` menu — at Version 1
Reported by: | taylor.smock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.01 |
Component: | Core imagery | Version: | latest |
Keywords: | jnlp, imagery | Cc: |
Description (last modified by )
This may be Mac OS X only.
The issue appears to be on source:trunk/src/org/openstreetmap/josm/tools/ImageProvider.java#L858 -- cache remains locked by another thread indefinitely.
Is there a reason why we aren't using java.util.concurrent.ConcurrentHashMap
instead of java.util.HashMap
? Or an actual lock object? I know I've gotten warnings from some lint tools about using synchronized (map)
in the past.
Alternatively, we could just wrap it in a Collections.synchronizedMap
.
Please note that I have not tested it yet -- I need to figure out how to run a jnlp
from a local source. I may end up having to spin up a server for it.
Steps to reproduce:
1) Start josm.jnlp (josm-latest.jnlp works as well)
2) 'https://api.openstreetmap.org/api/0.6/map?bbox=-47.8898656,-15.8114964,-47.8875375,-15.8092976' is the test area
3) Open Imagery
menu
Change History (3)
by , 6 years ago
Attachment: | 18534.ConcurrentHashMap.patch added |
---|
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
Using a ConcurrentHashMap