Modify

Opened 16 years ago

Closed 15 years ago

#2777 closed defect (fixed)

InvocationTargetException in PicLayer plugin

Reported by: anonymous Owned by: anonymous
Priority: major Milestone:
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 by ulfl, 16 years ago

Resolution: worksforme
Status: newclosed

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

comment:2 by jttt, 16 years ago

Resolution: worksforme
Status: closedreopened

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 by stoecker, 16 years ago

Component: CorePlugin
Status: reopenednew
Summary: errorInvocationTargetException in PicLayer plugin

comment:4 by stoecker, 15 years ago

Owner: changed from team to anonymous
Status: newneedinfo

Fixed and about to close?

in reply to:  4 comment:5 by Gubaer, 15 years ago

Resolution: fixed
Status: needinfoclosed

Replying to stoecker:

Fixed and about to close?

The current version is now [o18597] and activeLayerChanged() looks pretty empty. I'm going to close this one.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
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.