Modify

Opened 10 years ago

Closed 10 years ago

#11619 closed defect (fixed)

Deadlock when removing Mapillary layer

Reported by: wiktorn Owned by: wiktorn
Priority: normal Milestone:
Component: Plugin mapillary Version: latest
Keywords: Cc: nokutu

Description

When working with Mapillary layer on area, that there is no mapillary images, I observed following strange behaviour:

  1. I couldn't get ctrl+h or history view (for menu) to work. It looked like ignored (but see further)
  2. I tried to remove the Mapillary layer, but it start to re-add itself. Maybe it was due to the fact, that download of mapillary images took some time
  3. When I finally succeeded in removal of Mapillary layer, all overdue history dialogs appeared at once.
  4. When I readded the Mapillary layer and later removed it, a livelock happened. Stacktrace from AWT thread:
"AWT-EventQueue-0" #18 prio=6 os_prio=0 tid=0x000000001c33c000 nid=0x1580 waiting for monitor entry [0x000000002181d000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.getInstance(MapillaryLayer.java:112)
	- waiting to lock <0x0000000704301718> (a java.lang.Class for org.openstreetmap.josm.plugins.mapillary.MapillaryLayer)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryMouseAdapter.mouseDragged(MapillaryMouseAdapter.java:135)
	at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
	at java.awt.Component.processMouseMotionEvent(Unknown Source)
	at javax.swing.JComponent.processMouseMotionEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

   Locked ownable synchronizers:
	- None

And some related thread:

"pool-1-thread-1" #43 prio=5 os_prio=0 tid=0x000000002492a800 nid=0x17bc in Object.wait() [0x000000001e63e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Unknown Source)
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	- locked <0x00000007909c3318> (a java.awt.EventQueue$1AWTInvocationLock)
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWait(GuiHelper.java:112)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$ActivateLayerAction.updateEnabledState(LayerListDialog.java:699)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$3.valueChanged(LayerListDialog.java:346)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
	at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
	at javax.swing.DefaultListSelectionModel.removeSelectionIntervalImpl(Unknown Source)
	at javax.swing.DefaultListSelectionModel.clearSelection(Unknown Source)
	at javax.swing.JTable.clearSelection(Unknown Source)
	at javax.swing.JTable.clearSelectionAndLeadAnchor(Unknown Source)
	at javax.swing.JTable.tableChanged(Unknown Source)
	at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
	at javax.swing.table.AbstractTableModel.fireTableDataChanged(Unknown Source)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel.onAddLayer(LayerListDialog.java:1304)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$LayerListModel.layerAdded(LayerListDialog.java:1567)
	at org.openstreetmap.josm.gui.MapView.fireLayerAdded(MapView.java:190)
	at org.openstreetmap.josm.gui.MapView.addLayer(MapView.java:356)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.init(MapillaryLayer.java:96)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.<init>(MapillaryLayer.java:79)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.getInstance(MapillaryLayer.java:113)
	- locked <0x0000000704301718> (a java.lang.Class for org.openstreetmap.josm.plugins.mapillary.MapillaryLayer)
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySequenceDownloadThread.<init>(MapillarySequenceDownloadThread.java:41)
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySquareDownloadManagerThread.downloadSequences(MapillarySquareDownloadManagerThread.java:58)
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySquareDownloadManagerThread.run(MapillarySquareDownloadManagerThread.java:37)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
	- <0x0000000702df0448> (a java.util.concurrent.ThreadPoolExecutor$Worker)

JOSM info:

Revision: 8540
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-27 21:43:35 +0200 (Sat, 27 Jun 2015)
Build-Date: 2015-06-28 01:32:06
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8540

Identification: JOSM/1.5 (8540 en) Windows 7 64-Bit
Memory Usage: 779 MB / 2727 MB (576 MB allocated, but free)
Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Program arguments: [--debug]
Dataset consistency test: No problems found

Plugins:
- Mapillary (31282)
- commons-imaging (31241)
- geotools (31126)
- jts (31126)
- opendata (31241)
- photo_geotagging (31241)
- reverter (31241)
- utilsplugin2 (31241)

Attachments (1)

Mapillary test.gpx.gz (98.3 KB ) - added by wiktorn 10 years ago.
test gpx to download large area

Download all attachments as: .zip

Change History (23)

comment:1 by nokutu, 10 years ago

I fixed a couple of bugs since last stable version, maybe this one is related. Could you try using the development version?

https://github.com/nokutu/mapillary/blob/master/Mapillary.jar?raw=true

Last edited 10 years ago by nokutu (previous) (diff)

comment:2 by nokutu, 10 years ago

Owner: changed from nokutu to wiktorn
Status: newneedinfo

comment:3 by wiktorn, 10 years ago

Owner: changed from wiktorn to nokutu
Status: needinfonew

All bugs still perists:

  • readding of Mapillary layer, after it was removed
  • Mapillary download blocks other requests to OSM API (for example - getting history of the object, downloading area etc.)
  • livelock on Mapillary layer remove

What I found out, that the best way to reproduce is to download really large area to OSM. I work currently with around 600 sq km, downloaded along GPX.

Interesting stacktraces (this time from JavaWS so not that good):

"AWT-EventQueue-2" prio=6 tid=42 BLOCKED
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.getInstance(MapillaryLayer.java:121)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryMouseAdapter.mouseDragged(MapillaryMouseAdapter.java:138)
	   Local Variable: org.openstreetmap.josm.plugins.mapillary.MapillaryMouseAdapter#2
	at java.awt.AWTEventMulticaster.mouseDragged(<unknown string>)
	at java.awt.Component.processMouseMotionEvent(<unknown string>)
	at javax.swing.JComponent.processMouseMotionEvent(<unknown string>)
	at java.awt.Component.processEvent(<unknown string>)
	at java.awt.Container.processEvent(<unknown string>)
	at java.awt.Component.dispatchEventImpl(<unknown string>)
	at java.awt.Container.dispatchEventImpl(<unknown string>)
	   Local Variable: org.openstreetmap.josm.gui.MapView#1
	at java.awt.Component.dispatchEvent(<unknown string>)
	at java.awt.LightweightDispatcher.retargetMouseEvent(<unknown string>)
	   Local Variable: java.awt.event.MouseEvent#1
	at java.awt.LightweightDispatcher.processMouseEvent(<unknown string>)
	at java.awt.LightweightDispatcher.dispatchEvent(<unknown string>)
	   Local Variable: java.awt.LightweightDispatcher#2
	at java.awt.Container.dispatchEventImpl(<unknown string>)
	   Local Variable: javax.swing.JFrame#1
	at java.awt.Window.dispatchEventImpl(<unknown string>)
	at java.awt.Component.dispatchEvent(<unknown string>)
	at java.awt.EventQueue.dispatchEventImpl(<unknown string>)
	at java.awt.EventQueue.access$500(<unknown string>)
	at java.awt.EventQueue$3.run(<unknown string>)
	at java.awt.EventQueue$3.run(<unknown string>)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(<unknown string>)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(<unknown string>)
	at java.awt.EventQueue$4.run(<unknown string>)
	at java.awt.EventQueue$4.run(<unknown string>)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(<unknown string>)
	at java.awt.EventQueue.dispatchEvent(<unknown string>)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(<unknown string>)
	   Local Variable: java.awt.event.MouseEvent#4
	at java.awt.EventDispatchThread.pumpEventsForFilter(<unknown string>)
	   Local Variable: java.awt.EventDispatchThread$HierarchyEventFilter#1
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(<unknown string>)
	at java.awt.EventDispatchThread.pumpEvents(<unknown string>)
	at java.awt.EventDispatchThread.pumpEvents(<unknown string>)
	   Local Variable: java.awt.EventDispatchThread$1#1
	at java.awt.EventDispatchThread.run(<unknown string>)
"pool-1-thread-1" prio=5 tid=70 WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(<unknown string>)
	at java.awt.EventQueue.invokeAndWait(<unknown string>)
	   Local Variable: java.awt.event.InvocationEvent#196
	at java.awt.EventQueue.invokeAndWait(<unknown string>)
	at javax.swing.SwingUtilities.invokeAndWait(<unknown string>)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWait(GuiHelper.java:112)
	   Local Variable: org.openstreetmap.josm.gui.dialogs.LayerListDialog$ActivateLayerAction$1#1
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$ActivateLayerAction.updateEnabledState(LayerListDialog.java:695)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$ActivateLayerAction.layerAdded(LayerListDialog.java:719)
	at org.openstreetmap.josm.gui.MapView.fireLayerAdded(MapView.java:189)
	   Local Variable: java.util.concurrent.CopyOnWriteArrayList$COWIterator#1
	   Local Variable: org.openstreetmap.josm.gui.dialogs.LayerListDialog$ActivateLayerAction#1
	at org.openstreetmap.josm.gui.MapView.addLayer(MapView.java:352)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.init(MapillaryLayer.java:104)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.<init>(MapillaryLayer.java:87)
	   Local Variable: org.openstreetmap.josm.plugins.mapillary.MapillaryLayer#2
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.getInstance(MapillaryLayer.java:122)
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySequenceDownloadThread.<init>(MapillarySequenceDownloadThread.java:41)
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySquareDownloadManagerThread.downloadSequences(MapillarySquareDownloadManagerThread.java:62)
	   Local Variable: java.util.concurrent.ThreadPoolExecutor#8
	at org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySquareDownloadManagerThread.run(MapillarySquareDownloadManagerThread.java:39)
	   Local Variable: org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySquareDownloadManagerThread#20
	at java.util.concurrent.Executors$RunnableAdapter.call(<unknown string>)
	   Local Variable: java.util.concurrent.Executors$RunnableAdapter#21
	at java.util.concurrent.FutureTask.run(<unknown string>)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(<unknown string>)
	   Local Variable: java.util.concurrent.FutureTask#20
	   Local Variable: org.openstreetmap.josm.gui.progress.ProgressMonitorExecutor#1
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(<unknown string>)
	   Local Variable: java.util.concurrent.ThreadPoolExecutor$Worker#6
	at java.lang.Thread.run(<unknown string>)

I think that having Mapillary layer as singleton instance is not the best idea. I haven't yet investigated your latest code, but it could help you avoid many of above problems, if you would just pass the instance of your layer together with requests (as a listener getting notification about finish of the task), more less, as it's done in TMS/WMS layers.

by wiktorn, 10 years ago

Attachment: Mapillary test.gpx.gz added

test gpx to download large area

comment:4 by nokutu, 10 years ago

I suppose that what you do is:

  1. Import the gpx
  2. Right click on the gpx layer and donwload OSM data alogn it.
  3. Start the Mapillary layer (I suppose you are in automatic mode, so it downloads the images when you open the layer)

In this case the download takes lots as there are a los of smaller areas which must be downloaded. If you close the layer before finishing it will reopen again, I will have to fix that. About the rest, I'll try to pass to the download threads the layer as a parameter. Where you doing anything during the download that could cause the livelock?

comment:5 by wiktorn, 10 years ago

You correctly guessed what I do.

What I do during the download:

  • checking the history (that is blocked by mapilary downloads)

What causes the livelock is, that after some part of the download finishes (history windows appear), when I delete the Mapillary layer, I do get a livelock.

comment:6 by nokutu, 10 years ago

I've updated the development version. It stills blocks everything while it is downloading but I haven't got the livelocks.

comment:7 by wiktorn, 10 years ago

I tried the latest jar and got:

Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.openstreetmap.josm.plugins.PluginProxy.mapFrameInitialized(PluginProxy.java:30)
	... 43 more
Caused by: java.lang.NoClassDefFoundError: org/openstreetmap/josm/plugins/mapillary/gui/MapillaryImageDisplay
	at org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin.mapFrameInitialized(MapillaryPlugin.java:103)
	... 48 more
Caused by: java.lang.ClassNotFoundException: org.openstreetmap.josm.plugins.mapillary.gui.MapillaryImageDisplay
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	... 49 more

Incomplete jar?

comment:8 by nokutu, 10 years ago

I've updated the stable version. Now it shouldn't block the other OSM API queries. Two questions:

  • What OS are you using?
  • How do you get the awt stacktrace? Does it appear in the console or do you have to do something different?

comment:9 by wiktorn, 10 years ago

All the tests I did on Windows 7.

I obtained stacktrace using jvisualvm (https://visualvm.java.net/)

comment:10 by nokutu, 10 years ago

How do you use it? Just open JOSM and visualvm and select the process? If those errors appear, are they automatically shown?

comment:11 by wiktorn, 10 years ago

Start JOSM, start VisualVM, use JOSM till livelock occurs, select JOSM process, ask for a threaddump in VisualVM (threads panel)

comment:12 by nokutu, 10 years ago

Owner: changed from nokutu to wiktorn
Status: newneedinfo

Ok, thanks. I've fixed a few things, do you still have errors?

comment:13 by wiktorn, 10 years ago

I've just downloaded the latest version and got:

Revision: 8491
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-16 23:27:08 +0200 (Tue, 16 Jun 2015)
Build-Date: 2015-06-16 21:45:58
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8491

Identification: JOSM/1.5 (8491 en) Windows 7 64-Bit
Memory Usage: 417 MB / 910 MB (141 MB allocated, but free)
Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- Mapillary (31324)
- commons-imaging (31241)
- geotools (31126)
- jts (31126)
- opendata (31241)
- photo_geotagging (31241)
- reverter (31241)
- utilsplugin2 (31241)

Last errors/warnings:
- E: java.lang.NullPointerException

java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryToggleDialog.updateTitle(MapillaryToggleDialog.java:227)
	at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryToggleDialog$2.run(MapillaryToggleDialog.java:221)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Last edited 10 years ago by wiktorn (previous) (diff)

comment:14 by nokutu, 10 years ago

Update to version 31326, you shouldn't get this bug

comment:15 by wiktorn, 10 years ago

Something different happened:

Revision: 8491
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-16 23:27:08 +0200 (Tue, 16 Jun 2015)
Build-Date: 2015-06-16 21:45:58
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8491

Identification: JOSM/1.5 (8491 en) Windows 7 64-Bit
Memory Usage: 440 MB / 910 MB (76 MB allocated, but free)
Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- Mapillary (31326)
- commons-imaging (31241)
- geotools (31126)
- jts (31126)
- opendata (31241)
- photo_geotagging (31241)
- reverter (31241)
- utilsplugin2 (31241)

Last errors/warnings:
- E: java.lang.IllegalArgumentException

java.lang.IllegalArgumentException
	at org.openstreetmap.josm.plugins.mapillary.MapillarySequence.next(MapillarySequence.java:77)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryImage.next(MapillaryImage.java:115)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.paint(MapillaryLayer.java:317)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:534)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:634)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$1300(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

comment:16 by nokutu, 10 years ago

Uff, damn concurrency. I've tested it a few times and don't get any error, could you try the development version?

https://github.com/nokutu/mapillary/blob/master/Mapillary.jar?raw=true

comment:17 by wiktorn, 10 years ago

Revision: 8491
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-16 23:27:08 +0200 (Tue, 16 Jun 2015)
Build-Date: 2015-06-16 21:45:58
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8491

Identification: JOSM/1.5 (8491 en) Windows 7 64-Bit
Memory Usage: 434 MB / 910 MB (82 MB allocated, but free)
Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- Mapillary (31326)
- commons-imaging (31241)
- geotools (31126)
- jts (31126)
- opendata (31241)
- photo_geotagging (31241)
- reverter (31241)
- utilsplugin2 (31241)

Last errors/warnings:
- E: java.lang.NullPointerException

java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.mapillary.MapillaryLayer.paint(MapillaryLayer.java:319)
	at org.openstreetmap.josm.gui.MapView.paintLayer(MapView.java:534)
	at org.openstreetmap.josm.gui.MapView.paint(MapView.java:634)
	at javax.swing.JComponent.paintChildren(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at javax.swing.RepaintManager$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$1300(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

comment:18 by nokutu, 10 years ago

Ok, updated again. Sorry for making you test all this and thanks for your help.

comment:19 by wiktorn, 10 years ago

No problem.

It looks more less, like it's working right now. I did one more tests though. I let the plugin download the area, show me the picture in preview windows, then removed the Mapillary layer, and then I clicked buttons "jump to blue", / "previous" / "next" / "jump to red" until I got:

Revision: 8491
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-06-16 23:27:08 +0200 (Tue, 16 Jun 2015)
Build-Date: 2015-06-16 21:45:58
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8491

Identification: JOSM/1.5 (8491 en) Windows 7 64-Bit
Memory Usage: 408 MB / 910 MB (50 MB allocated, but free)
Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- Mapillary (31326)
- commons-imaging (31241)
- geotools (31126)
- jts (31126)
- opendata (31241)
- photo_geotagging (31241)
- reverter (31241)
- utilsplugin2 (31241)

Last errors/warnings:
- E: java.lang.IllegalStateException

java.lang.IllegalStateException
	at org.openstreetmap.josm.plugins.mapillary.MapillaryData.selectPrevious(MapillaryData.java:194)
	at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryToggleDialog$previousPictureAction.actionPerformed(MapillaryToggleDialog.java:283)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Users will always astound you with ways they can use your software :-)

comment:20 by nokutu, 10 years ago

Ok, now when you close the layer the image changes to null.

comment:21 by Don-vip, 10 years ago

Milestone: 15.07

comment:22 by wiktorn, 10 years ago

Resolution: fixed
Status: needinfoclosed

Looks ok, as far as I checked lately.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain wiktorn.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.