Modify

Opened 16 years ago

Closed 16 years ago

#2140 closed defect (fixed)

[PATCH] JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded

Reported by: xeen Owned by: framm
Priority: minor Milestone:
Component: unspecified Version:
Keywords: Cc:

Description

The error appears under the following conditions:

  • At least one node of the relation is not yet downloaded
  • The way must be part of the relation
  • You need to move the way /and/ its nodes

I attached a minimal test case. The error is as follows:

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1365
Node Kind: directory
Last Changed Author: ulfl
Last Changed Rev: 1365
Last Changed Date: 2009-02-01 22:20:56 +0100 (Sun, 01 Feb 2009)

Java version: 1.6.0_06
Plugins: AgPifoJ;Create_grid_of_ways;DirectUpload;nearclick;openstreetbugs;slippy_map_chooser;utilsplugin;validator;wmsplugin
Plugin AgPifoJ Version: 13409
Plugin Create_grid_of_ways Version: 12782
Plugin DirectUpload Version: ${version.entry.commit.revision}
Plugin nearclick Version: 13409
Plugin openstreetbugs Version: 13477
Plugin slippy_map_chooser Version: 13409
Plugin utilsplugin Version: ${version.entry.commit.revision}
Plugin validator Version: 13409
Plugin wmsplugin Version: 13409

java.lang.NullPointerException
	at org.openstreetmap.josm.command.MoveCommand.executeCommand(MoveCommand.java:99)
	at org.openstreetmap.josm.data.UndoRedoHandler.add(UndoRedoHandler.java:38)
	at org.openstreetmap.josm.actions.mapmode.SelectAction.mouseDragged(SelectAction.java:203)
	at java.awt.AWTEventMulticaster.mouseDragged(Unknown Source)
	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.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 (2)

test.osm (895 bytes ) - added by xeen 16 years ago.
Minimal testcase showing the error
FixRelationHandling.patch (952 bytes ) - added by xeen 16 years ago.
Easy fix – removes relations from selection when dealing with moving/rotating

Download all attachments as: .zip

Change History (6)

by xeen, 16 years ago

Attachment: test.osm added

Minimal testcase showing the error

comment:1 by xeen, 16 years ago

Investigated a bit and this always happen when trying to move a relation with non-download parts. So, CTRL+A is not required, just double click a relation in the relation dialog and select an additional node or way (so you have something to "grip on" when moving) and it will produce the same error.

We could simply ignore relations when trying to move them or warn that the whole relation must be downloaded in order to move it. Former approach is probably easier and I prefer it because I don't see the reason of being able to move a relation. It's not a common case and if this is really needed one can just double click the relation in the relations dialog and move all selected ways/nodes.

comment:2 by anonymous, 16 years ago

Relations cannot be moved (only their elements), so approach one is correct.

by xeen, 16 years ago

Attachment: FixRelationHandling.patch added

Easy fix – removes relations from selection when dealing with moving/rotating

comment:3 by anonymous, 16 years ago

Summary: JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded[PATCH] JOSM error when moving way+nodes when it is part of relation with at least one node not downloaded

comment:4 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r1398.

Modify Ticket

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