﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
18656	Mapillary triggering a Java deadlock	Emvee	jpietri	"==== What steps will reproduce the problem?
1. Start josm, download some area, enable some Imagery
2. Make sure Mapillary is configured such that it only downloads images manually
3. Enable the Mapillary image layer and press Download Mapillary images in the current view (Shift-Period)
4. Disable imagery, download some new area and and re-enable imagery one-by-one
5. Press Download Mapillary images in the current view
6. josm GUI hangs

Often multiple cycles of 4 & 5 are needed to get into the hang

==== What is the expected result?

No GUI hang

==== What happens instead?

The GUI hangs, JOSM can be stopped using Ctrl-C

==== Please provide any additional information below. Attach a screenshot if possible.

Did do a ""killall -s QUIT java"" to get a stack track and that stack track is reporting one Java-level deadlock:

{{{
Found one Java-level deadlock:
=============================
""AWT-EventQueue-0"":
  waiting to lock monitor 0x00007fe62803ef00 (object 0x0000000749ed8d58, a org.openstreetmap.josm.plugins.mapillary.MapillaryLayer),
  which is held by ""pool-1-thread-3""
""pool-1-thread-3"":
  waiting to lock monitor 0x00007fe64401cf00 (object 0x00000007405ddd38, a java.awt.Component$AWTTreeLock),
  which is held by ""AWT-EventQueue-0""
}}}

The full stack trace is attached.

I am seeing this behavior already longer time, I guess for at least a month.
Made also a stack trace for an earlier release of josm and another JRE but still the same deadlock

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-02-01 01:10:57 +0100 (Sat, 01 Feb 2020)
Revision:15806
Build-Date:2020-02-01 00:12:46
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15806 en) Linux openSUSE Tumbleweed
Memory Usage: 1655 MB / 2731 MB (1140 MB allocated, but free)
Java version: 12.0.1+12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 2560x1440
Maximum Screen Size: 2560x1440
apache-commons-compress: apache-commons-compress:noarch-1.19
apache-commons-logging: apache-commons-logging:noarch-1.2
Dataset consistency test: No problems found

Plugins:
+ ColumbusCSV (35248)
+ Mapillary (1.5.20)
+ PicLayer (35313)
+ PolygonCutOut (v0.7)
+ alignways (35248)
+ apache-commons (35092)
+ apache-http (35092)
+ ejml (35122)
+ geotools (35169)
+ jna (35092)
+ jts (35122)
+ log4j (35092)
+ openvisible (35248)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
+ http://mijndev.openstreetmap.nl/~allroads/JOSM/Styles/Road_Extended_JOSM_style.zip

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
}}}
"	defect	closed	critical		Plugin mapillary		duplicate	template_report	
