Modify

Opened 16 years ago

Closed 16 years ago

#2168 closed defect (fixed)

[PATCH] karte geschlossen, karte neu laden lassen, ausnahmefehler

Reported by: anonymous Owned by: xeen
Priority: minor Milestone:
Component: unspecified 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: 1394
Node Kind: directory
Last Changed Author: ce
Last Changed Rev: 1394
Last Changed Date: 2009-02-11 22:49:33 +0100 (Wed, 11 Feb 2009)

Java version: 1.6.0_12
Plugins: utilsplugin;validator;wmsplugin
Plugin utilsplugin Version: 13575
Plugin validator Version: 13598
Plugin wmsplugin Version: 13673

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

at org.openstreetmap.josm.gui.PleaseWaitRunnable.closeDialog(PleaseWaitRunnable.java:146)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:95)
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:142)
... 4 more

Caused by: java.lang.NullPointerException

at org.openstreetmap.josm.gui.NavigatableComponent.getEastNorth(NavigatableComponent.java:107)
at org.openstreetmap.josm.actions.mapmode.DrawAction.computeHelperLine(DrawAction.java:408)
at org.openstreetmap.josm.actions.mapmode.DrawAction.selectionChanged(DrawAction.java:141)
at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:194)
at org.openstreetmap.josm.gui.MapView.setActiveLayer(MapView.java:355)
at org.openstreetmap.josm.gui.dialogs.LayerListDialog$2.valueChanged(LayerListDialog.java:195)
at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
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.setSelectionInterval(Unknown Source)
at javax.swing.JList.setSelectedIndex(Unknown Source)
at javax.swing.JList.setSelectedValue(Unknown Source)
at org.openstreetmap.josm.gui.dialogs.LayerListDialog.activeLayerChange(LayerListDialog.java:320)
at org.openstreetmap.josm.gui.MapView.setActiveLayer(MapView.java:360)
at org.openstreetmap.josm.gui.MapView.addLayer(MapView.java:173)
at org.openstreetmap.josm.Main.addLayer(Main.java:219)
at org.openstreetmap.josm.actions.NewAction.actionPerformed(NewAction.java:22)
at org.openstreetmap.josm.Main.editLayer(Main.java:226)
at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$Task.finish(DownloadOsmTask.java:62)
at org.openstreetmap.josm.gui.PleaseWaitRunnable$4.run(PleaseWaitRunnable.java:128)
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:78)
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 (1)

Fix Exception.patch (1.8 KB ) - added by xeen 16 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by xeen, 16 years ago

Please be more specific about how to reproduce the problem. "PleaseWaitRunnable.closeDialog" in the trace hints that you clicked the cancel button and not just "closed and re-opened the map".

comment:2 by xeen, 16 years ago

This bug is valid, I had a similar or iirc even the same stack trace lately. Unfortunately it wasn't reproducible. Will keep an eye out though.

comment:3 by xeen, 16 years ago

Owner: changed from framm to xeen
Status: newassigned

Steps to reproduce:

  • Download something
  • Start drawing and without finishing delete the layer
  • Download again
  • Described as above

My guess is that DrawAction doesn't clean up correctly and tries to find the old node that is "still selected" which is null of course.

File could not be found.Java version: 1.6.0_06
Plugins: AgPifoJ;Create_grid_of_ways;DirectUpload;nearclick;openstreetbugs;terracer;utilsplugin;validator;wmsplugin
Plugin AgPifoJ Version: ${version.entry.commit.revision}
Plugin Create_grid_of_ways Version: 12782
Plugin DirectUpload Version: ${version.entry.commit.revision}
Plugin nearclick Version: 13409
Plugin openstreetbugs Version: 13477
Plugin terracer Version: 13561
Plugin utilsplugin Version: ${version.entry.commit.revision}
Plugin validator Version: 13598
Plugin wmsplugin Version: ${version.entry.commit.revision}

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.closeDialog(PleaseWaitRunnable.java:146)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:95)
	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:142)
	... 4 more
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.gui.NavigatableComponent.getEastNorth(NavigatableComponent.java:108)
	at org.openstreetmap.josm.actions.mapmode.DrawAction.computeHelperLine(DrawAction.java:569)
	at org.openstreetmap.josm.actions.mapmode.DrawAction.selectionChanged(DrawAction.java:231)
	at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:198)
	at org.openstreetmap.josm.gui.MapView.setActiveLayer(MapView.java:360)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog$2.valueChanged(LayerListDialog.java:198)
	at javax.swing.JList.fireSelectionValueChanged(Unknown Source)
	at javax.swing.JList$ListSelectionHandler.valueChanged(Unknown Source)
	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.setSelectionInterval(Unknown Source)
	at javax.swing.JList.setSelectedIndex(Unknown Source)
	at javax.swing.JList.setSelectedValue(Unknown Source)
	at org.openstreetmap.josm.gui.dialogs.LayerListDialog.activeLayerChange(LayerListDialog.java:323)
	at org.openstreetmap.josm.gui.MapView.setActiveLayer(MapView.java:365)
	at org.openstreetmap.josm.gui.MapView.addLayer(MapView.java:173)
	at org.openstreetmap.josm.Main.addLayer(Main.java:220)
	at org.openstreetmap.josm.actions.NewAction.actionPerformed(NewAction.java:22)
	at org.openstreetmap.josm.Main.editLayer(Main.java:227)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$Task.finish(DownloadOsmTask.java:62)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable$4.run(PleaseWaitRunnable.java:128)
	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:78)
	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)

by xeen, 16 years ago

Attachment: Fix Exception.patch added

comment:4 by xeen, 16 years ago

Summary: karte geschlossen, karte neu laden lassen, ausnahmefehler[PATCH] karte geschlossen, karte neu laden lassen, ausnahmefehler

The patch fixes two issues:

  • in NavigateableComponent: <center> is not initialized after mapView is created, thus the NullPointer when computeHelperline tries to find the center of the Map. If the map was not yet initialized correctly the center really seems to be 0,0 so this isn't some kind of hack.
  • in DrawAction: When working with two DataLayers and deleting both DrawAction it was assumed that mapView isn't null (but it gets, as soon as the last layer is deleted).

comment:5 by stoecker, 16 years ago

Resolution: fixed
Status: assignedclosed

In #1430.

Modify Ticket

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