Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6335 closed defect (fixed)

utilsplugin2: NPE copying relation tag from id:0

Reported by: skyper Owned by: team
Priority: normal Milestone:
Component: Plugin utilsplugin2 Version: latest
Keywords: template_report NPE relation copy Cc:

Description

What steps will reproduce the problem?

  1. select a closeway with relation membership
  2. press Ctrl-C to copy
  3. select other closedway and press Ctrl-Alt-V

What is the expected result?

Relation membership will be added to second way.

What happens instead?

NPE

Please provide any additional information below. Attach a screenshot if
possible.

I just noticed that I am almost out of ram memory. Maybe this effected this NPE. I have seen weird things happen when JOSM is almost out of memory.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-05-10 01:31:40
Last Changed Author: jttt
Revision: 4079
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-05-09 21:50:34 +0200 (Mon, 09 May 2011)
Last Changed Rev: 4079

Identification: JOSM/1.5 (4079 en)
Memory Usage: 248 MB / 248 MB (46 MB allocated, but free)
Java version: 1.6.0_18, Sun Microsystems Inc., OpenJDK Client VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (25190)
Plugin: buildings_tools (25905)
Plugin: multipoly-convert (25192)
Plugin: reverter (25578)
Plugin: terracer (25199)
Plugin: turnlanes (25908)
Plugin: undelete (25199)
Plugin: utilsplugin2 (25912)
Plugin: waydownloader (25190)

java.lang.NullPointerException
	at utilsplugin2.dumbutils.PasteRelationsAction.actionPerformed(PasteRelationsAction.java:35)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:285)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:247)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
	at java.awt.Component.processEvent(Component.java:5913)
	at java.awt.Container.processEvent(Container.java:2105)
	at java.awt.Component.dispatchEventImpl(Component.java:4497)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Component.dispatchEvent(Component.java:4323)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1881)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:749)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1025)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:892)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:713)
	at java.awt.Component.dispatchEventImpl(Component.java:4367)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4323)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
	at java.awt.EventQueue$2.run(EventQueue.java:622)
	at java.awt.EventQueue$2.run(EventQueue.java:620)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Attachments (1)

josm_bug_6335.osm (3.9 KB ) - added by skyper 13 years ago.
example file

Download all attachments as: .zip

Change History (10)

comment:1 by bastiK, 13 years ago

Resolution: irreproducible
Status: newclosed

need more info to fix this

comment:2 by skyper, 13 years ago

Maybe this is a side effect of JOSM having problems when running out of memory.

I have sometimes problems when JOSM runs out of memory and not informing the user about it like validator does.
Deleting a layer (validator,imagery ...) often solves the problem temporally.

Usually I only edit in small areas and restart JOSM from time to time to avoid running out of memory.

comment:3 by skyper, 13 years ago

It happened again with a new pref dir.

I attach an example.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-05-16 01:31:36
Last Changed Author: bastiK
Revision: 4088
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-05-16 00:44:54 +0200 (Mon, 16 May 2011)
Last Changed Rev: 4088

Identification: JOSM/1.5 (4088 de)
Memory Usage: 32 MB / 508 MB (11 MB allocated, but free)
Java version: 1.6.0_18, Sun Microsystems Inc., OpenJDK Client VM
Operating system: Linux
Dataset consistency test: No problems found

Plugin: utilsplugin2 (25912)

java.lang.NullPointerException
	at utilsplugin2.dumbutils.PasteRelationsAction.actionPerformed(PasteRelationsAction.java:35)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1664)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:285)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:247)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
	at java.awt.Component.processEvent(Component.java:5913)
	at java.awt.Container.processEvent(Container.java:2105)
	at java.awt.Component.dispatchEventImpl(Component.java:4497)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Component.dispatchEvent(Component.java:4323)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1881)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:749)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1025)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:892)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:713)
	at java.awt.Component.dispatchEventImpl(Component.java:4367)
	at java.awt.Container.dispatchEventImpl(Container.java:2163)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4323)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649)
	at java.awt.EventQueue.access$000(EventQueue.java:96)
	at java.awt.EventQueue$1.run(EventQueue.java:608)
	at java.awt.EventQueue$1.run(EventQueue.java:606)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
	at java.awt.EventQueue$2.run(EventQueue.java:622)
	at java.awt.EventQueue$2.run(EventQueue.java:620)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:619)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

by skyper, 13 years ago

Attachment: josm_bug_6335.osm added

example file

comment:4 by skyper, 13 years ago

Resolution: irreproducible
Status: closedreopened

in reply to:  2 comment:5 by skyper, 13 years ago

Replying to skyper:

Maybe this is a side effect of JOSM having problems when running out of memory.

No it is not !

I have this problem if the object in buffer is way.For nodes it is working.

r4135

Last edited 13 years ago by skyper (previous) (diff)

comment:6 by skyper, 13 years ago

Summary: utilsplugin2: NPE copying relation tag from one closed way to anotherutilsplugin2: NPE copying relation tag from id:0

I found the problem !

It has to do with new objects. If the object in buffer has (id:0), I get a NPE. It does not matter if the object is a way or a node.

comment:7 by akks, 13 years ago

Thank you for good example.
I am not the author of this feature, but fix was easy enough - I have replaced getId() with getUniqueId().

comment:8 by akks, 13 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by rickmastfan67, 13 years ago

Just a FYI, it was fixed in [o26269].

Last edited 13 years ago by rickmastfan67 (previous) (diff)

Modify Ticket

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