Modify

Opened 14 years ago

Closed 14 years ago

#2983 closed defect (fixed)

Error involving presets key-element without value, or other incorrect key syntax

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Presets Cc:

Description

When having a presets file loaded that cointains a <key key="tag" /> (without value, to remove this tag), anytime a way is touched that contains this tag, an error occurs.

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1799
Node Kind: directory
Last Changed Author: Gubaer
Last Changed Rev: 1799
Last Changed Date: 2009-07-16 19:23:24 +0200 (Thu, 16 Jul 2009)

Memory Usage: 16 MB / 63 MB (1 MB allocated, but free)
Java version: 1.6.0_11

java.lang.NullPointerException

at java.util.TreeMap.getEntry(Unknown Source)
at java.util.TreeMap.containsKey(Unknown Source)
at org.openstreetmap.josm.gui.dialogs.PropertiesDialog.checkPresets(PropertiesDialog.java:713)
at org.openstreetmap.josm.gui.dialogs.PropertiesDialog.selectionChanged(PropertiesDialog.java:817)
at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:213)
at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:161)
at org.openstreetmap.josm.gui.tagging.TaggingPreset.actionPerformed(TaggingPreset.java:656)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(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 (1)

Bad_Presets.xml (362 bytes) - added by AM909 14 years ago.
Demo of NPE on presets syntax error

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by AM909

Attachment: Bad_Presets.xml added

Demo of NPE on presets syntax error

comment:1 Changed 14 years ago by AM909

Priority: minornormal
Summary: Error involving presets key-element without valueError involving presets key-element without value, or other incorrect key syntax

A NPE with a similar traceback occurs if you try to create a node or do much of anything else when using the attached presets file because it contains:

<key k="amenity" v="fuel" />

instead of

<key key="amenity" value="fuel" />

comment:2 Changed 14 years ago by Gubaer

Resolution: fixed
Status: newclosed

(In [2537]) fixed #2983: Error involving presets key-element without value, or other incorrect key syntax

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.