Bug#1065678: josm: JOSM hangs when downloading Bing imagery, but only the first time in a session

2024-03-09 Thread Sebastiaan Couwenberg

On 3/9/24 2:58 PM, Andrew Chadwick wrote:

I will continue reporting here, since this seems to be a Debian-
specific issue. I don't have much else to add, however. Happy to try
out fixes as they emerge.


Without upstream involvement, this issue will not get resolved.

Upstream doesn't built the Java code of its dependencies, it uses the 
JARs hosted on Maven.


The metadata-extractor 2.19.0 JAR from Maven uses xmpcore 6.1.11, the 
Debian package uses xmpcore 6.1.10 because that version has source JARs 
available unlike 6.1.11.


There are no other significant source changes.

Upstream builds their JARs with Java 8, the Debian package uses Java 17.

You can use the upstream JARs by purging the josm{,-l10n} & jmapviewer 
packages and installing the josm-installer package. The systemd timer it 
provides periodically downloads the upstream JAR. The package installs 
the same desktop integration files as the josm package.


Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#1065678: josm: JOSM hangs when downloading Bing imagery, but only the first time in a session

2024-03-09 Thread Andrew Chadwick
On Sat, 2024-03-09 at 07:49 +0100, Sebastiaan Couwenberg wrote:
> the workaround is to add the OSM Carto layer first, and then
> add the Bing layer.

This proposed workaround does not work for me. I need to kill and
restart a hung JOSM, and launch it again to get working a Bing layer.
Then (for my main working JOSM), the problem is worked around for a few
hours (estimated) while I edit.

The hang even affects the GUI: nothing responds within it as soon as
the menu item is selected, and the menu itself becomes unresponsive and
does not withdraw.

I have commented upstream that for now this seems to be a Debian issue.
See the comments at https://josm.openstreetmap.de/ticket/23540 for
further detail. Summary: I cannot reproduce this with upstream's josm-
tested.jar, but only with the jarfile in Debian's DFSG build. I am
using the same Debian Java for both tests, using

  $ java -Djosm.home=/tmp/something_new_and_unique \
-jar path/to/a/josm.jar \
--skip-plugins --debug

for consistency.

I will continue reporting here, since this seems to be a Debian-
specific issue. I don't have much else to add, however. Happy to try
out fixes as they emerge.


regards,
Andrew



Bug#1065678: josm: JOSM hangs when downloading Bing imagery, but only the first time in a session

2024-03-08 Thread Sebastiaan Couwenberg

Control: tags -1 upstream
Control: forwarded -1 https://josm.openstreetmap.de/ticket/23540

This is a known issue since the update to 18969, the workaround is to 
add the OSM Carto layer first, and then add the Bing layer.


As this is an upstream issue, you're encouraged to report it upstream 
directly: https://josm.openstreetmap.de/, it is not an issue that we can 
fix in the packaging.


Kind Regards,

Bas

--
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1



Bug#1065678: josm: JOSM hangs when downloading Bing imagery, but only the first time in a session

2024-03-08 Thread Andrew Chadwick
Package: josm
Version: 0.0.svn18969+dfsg-1
Severity: normal
X-Debbugs-Cc: a.t.chadw...@gmail.com

Dear Maintainer,

When JOSM is instructed to download Bing background satellite and aerial 
imagery, it hangs the first time JOSM is launched on a day of map editing. 
It seems to be a key caching issue. If JOSM is then killed, and 
subsequently launched again, it downloads the Bing imagery just fine.

If enough time then elapses without launching JOSM, the situation repeats. 
For me this is usually about a day, but the timeframe is probably a lot 
shorter.

I would expect Bing background imagery to be downloaded fine every time, 
without causing JOSM to hang.


## Minimal Steps to Reproduce

The hang will happen in all ordinary usage when Bing imagry is used, but in 
order to rule out config files and settings, you can run JOSM as

   $ JAVA_OPTS="-Djosm.home=/tmp/josmhome.$$" josm --skip-plugins --debug

This prevents it from loading your personal config file or any downloaded 
plugins. As soon as the main interface loads, add a Bing layer using

   Imagery → Bing aerial imagery

If this is the *first* time the josm.home location is being used (i.e. it 
didn’t exist before), JOSM will then hang with the final debug messages
shown immediately below. JOSM then hangs and has to be killed with ^C or 
using xkill.

---8<--
[...]
2024-03-08 20:12:56.115 FINE: Unsupported savable layer type: TMSLayer
2024-03-08 20:12:56.120 FINE: Contacting Server...
2024-03-08 20:12:56.120 FINE: REQUEST HEADERS: {Accept=*/*, 
Accept-Encoding=gzip, deflate}
2024-03-08 20:12:56.223 INFO: GET 
https://dev.virtualearth.net/REST/v1/Imagery/Metadata/AerialOSM?include=ImageryProviders&output=xml&key=...stripped...
 -> HTTP/1.1 200 (102 ms)
2024-03-08 20:12:56.223 FINE: RESPONSE HEADERS: {Transfer-Encoding=[chunked], 
null=[HTTP/1.1 200 OK], X-Cache=[CONFIG_NOCACHE], 
x-azure-ref=[20240308T201256Z-39saph36ah08xe5gfvn6y1z8pw00083g01pm],
 X-BM-TraceID=[cbf82a8a7dda1cbe233823c5d9cd1a91], Alt-Svc=[h3=":443"; 
ma=86400], Access-Control-Allow-Origin=[*], Access-Control-Allow-Methods=[POST, 
GET, OPTIONS], X-BM-FE-Elapsed=[5], Connection=[keep-alive], 
Access-Control-Allow-Headers=[Content-Type,X-FD-Features,X-FD-FLIGHT,PreferAnonymous],
 Date=[Fri, 08 Mar 2024 20:12:56 GMT], Cache-Control=[no-cache], 
X-AspNet-Version=[4.0.30319], X-BM-Srv=[mapsplatform-frontend-55b6b7bd84-p2lfw, 
DU3064], Content-Encoding=[gzip], Vary=[Accept-Encoding], 
X-MS-BM-WS-INFO=[0], X-Powered-By=[ASP.NET], Content-Type=[application/xml; 
charset=utf-8]}
2024-03-08 20:12:56.223 FINE: Downloading data...
2024-03-08 20:12:56.224 INFO: Successfully loaded Bing attribution data.
[hangs, ^C]
--->8--

If it’s the *second* time around (within some unknown number of minutes), 
JOSM does not hang, and goes on to print messages like

---8<--
2024-03-08 20:17:01.005 FINE: Unsupported savable layer type: TMSLayer
2024-03-08 20:17:01.033 FINE: Reading Bing logo from 
https://dev.virtualearth.net/Branding/logo_powered_by.png
2024-03-08 20:17:01.038 FINE: Contacting Server...
2024-03-08 20:17:01.039 FINE: REQUEST HEADERS: {Accept=*/*, 
Accept-Encoding=gzip, deflate}
2024-03-08 20:17:01.420 INFO: GET 
https://dev.virtualearth.net/Branding/logo_powered_by.png -> HTTP/1.1 200 (381 
ms; 1.17 kB)
2024-03-08 20:17:01.420 FINE: RESPONSE HEADERS: {Accept-Ranges=[bytes], 
null=[HTTP/1.1 200 OK], X-Cache=[CONFIG_NOCACHE], Alt-Svc=[h3=":443"; 
ma=86400], Cache-Control=[max-age=86400], ETag=["1da6b47d7e7e12e"], 
Last-Modified=[Thu, 29 Feb 2024 19:45:27 GMT], 
X-Azure-Ref=[0PXLrZQBRV4dQ4FinSYsXKjq3EwHuTE9OMjFFREdFMTgxMgBmMTI3MDYwYi1mNDk4LTRlMjAtYjVkZi1hZWIyMzczZWM5NWU=],
 Content-Length=[1198], Date=[Fri, 08 Mar 2024 20:17:00 GMT], 
Content-Type=[image/png]}
2024-03-08 20:17:01.421 FINE: Downloading data...
2024-03-08 20:17:01.480 INFO: AbstractTileSourceLayer: estimated visible tiles: 
54, estimated cache size: 466
2024-03-08 20:17:01.484 FINE: zoomChanged(): 2
2024-03-08 20:17:01.580 INFO: AbstractTileSourceLayer: estimated visible tiles: 
54, estimated cache size: 466
2024-03-08 20:17:01.629 INFO: AbstractTileSourceLayer: estimated visible tiles: 
54, estimated cache size: 466
2024-03-08 20:17:01.631 INFO: Allocate for tile source layer: 116 MB of memory. 
Available: 3 914 MB.
2024-03-08 20:17:01.644 FINE: zoomChanged(): 14
2024-03-08 20:17:01.645 FINE: JCS - Submitting job for execution for url: 
https://ecn.t2.tiles.virtualearth.net/tiles/a30.jpeg?g=14355&pr=odbl
2024-03-08 20:17:01.646 FINE: JCS - Submitting job for execution for url: 
https://ecn.t1.tiles.virtualearth.net/tiles/a21.jpeg?g=14355&pr=odbl
2024-03-08 20:17:01.646 FINE: JCS - starting fetch of url: 
https://ecn.t2.tiles.virtualearth.net/tiles/a30.jpeg?g=14355&pr=odbl
 
2024-03-08 20:17:01.646 FINE: JCS - starting fetch of url: 
https://ecn.t1.tiles.virtua