Opened 4 years ago
Closed 4 years ago
#2777 closed defect (fixed)
InvocationTargetException in PicLayer plugin
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | major | Component: | Plugin |
| Version: | latest | Keywords: | |
| Cc: |
Description
Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1669
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 1669
Last Changed Date: 2009-06-14 17:34:52 +0200 (Sun, 14 Jun 2009)
Java version: 1.6.0_10
Plugin PicLayer Version: 15193
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.openstreetmap.josm.gui.PleaseWaitRunnable$4.run(PleaseWaitRunnable.java:119)
at java.awt.event.InvocationEvent.dispatch(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)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.openstreetmap.josm.gui.PleaseWaitRunnable.closeDialog(PleaseWaitRunnable.java:173)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:112)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.closeDialog(PleaseWaitRunnable.java:169)
... 7 more
Caused by: java.lang.NullPointerException
at org.openstreetmap.josm.plugins.piclayer.PicLayerPlugin.activeLayerChange(PicLayerPlugin.java:105)
at org.openstreetmap.josm.gui.MapView.setActiveLayer(MapView.java:367)
at org.openstreetmap.josm.gui.MapView.addLayer(MapView.java:173)
at org.openstreetmap.josm.Main.addLayer(Main.java:222)
at org.openstreetmap.josm.actions.NewAction.actionPerformed(NewAction.java:22)
at org.openstreetmap.josm.Main.editLayer(Main.java:229)
at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$Task.finish(DownloadOsmTask.java:72)
at org.openstreetmap.josm.gui.PleaseWaitRunnable$5.run(PleaseWaitRunnable.java:155)
at java.awt.event.InvocationEvent.dispatch(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.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at org.openstreetmap.josm.gui.PleaseWaitRunnable$3.run(PleaseWaitRunnable.java:95)
at java.awt.event.InvocationEvent.dispatch(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)
Attachments (0)
Change History (5)
comment:1 Changed 4 years ago by ulfl
- Resolution set to worksforme
- Status changed from new to closed
comment:2 Changed 4 years ago by jttt
- Resolution worksforme deleted
- Status changed from closed to reopened
I think I know what happend there. PicLayer plugins relies on mapFrameInitialized being called before activeLayerChange. That's imho valid expectation.
But layer handling is not synchronized and if two threads try to create first edit layer in about the same time, then activeLayerChange might be called before mapFrameInitialized is called.
I will investigate this a bit futher, but so far it looks like simply adding synchronized keyword to layer handling methods will fix the issue.
comment:3 Changed 4 years ago by stoecker
- Component changed from Core to Plugin
- Status changed from reopened to new
- Summary changed from error to InvocationTargetException in PicLayer plugin
comment:4 follow-up: ↓ 5 Changed 4 years ago by stoecker
- Owner changed from team to anonymous
- Status changed from new to needinfo
Fixed and about to close?
comment:5 in reply to: ↑ 4 Changed 4 years ago by Gubaer
- Resolution set to fixed
- Status changed from needinfo to closed



Sorry, but without any further information what lead to this crash this report is pretty useless.