Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8530 closed defect (fixed)

NPE when loading external preset "Step properties" with JOSM >= 5783

Reported by: Luebeck Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description (last modified by Don-vip)

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-03-21 02:33:54
Last Changed Author: Don-vip
Revision: 5789
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-03-21 00:50:36 +0100 (Thu, 21 Mar 2013)
Last Changed Rev: 5789

Identification: JOSM/1.5 (5789 de)
Memory Usage: 34 MB / 989 MB (9 MB allocated, but free)
Java version: 1.6.0_30, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows 7

Plugin: AddrInterpolation
Plugin: HouseNumberTaggingTool
Plugin: OpeningHoursEditor
Plugin: RoadSigns
Plugin: buildings_tools
Plugin: measurement
Plugin: openstreetbugs
Plugin: reverter
Plugin: terracer
Plugin: utilsplugin2
Plugin: wikipedia

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at org.openstreetmap.josm.Main.<init>(Main.java:383)
	at org.openstreetmap.josm.gui.MainApplication.<init>(MainApplication.java:69)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:345)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
	at java.util.concurrent.FutureTask.get(Unknown Source)
	at org.openstreetmap.josm.Main.<init>(Main.java:380)
	... 2 more
Caused by: java.lang.NullPointerException
	at java.util.TreeMap.put(Unknown Source)
	at java.util.TreeSet.add(Unknown Source)
	at java.util.AbstractCollection.addAll(Unknown Source)
	at java.util.TreeSet.addAll(Unknown Source)
	at org.openstreetmap.josm.tools.MultiMap.putAll(MultiMap.java:69)
	at org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager.cachePresets(AutoCompletionManager.java:156)
	at org.openstreetmap.josm.gui.preferences.map.TaggingPresetPreference.initialize(TaggingPresetPreference.java:282)
	at org.openstreetmap.josm.Main$2.call(Main.java:341)
	at org.openstreetmap.josm.Main$2.call(Main.java:334)
	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)

Attachments (0)

Change History (9)

comment:1 by Don-vip, 11 years ago

Owner: changed from team to Don-vip
Status: newassigned

comment:2 by Don-vip, 11 years ago

In 5791/josm:

see #8530 - workaround for NPE when loading "Steps properties" presets ("No handrail" item) + various minor stuff

comment:3 by Don-vip, 11 years ago

Keywords: template_report removed
Priority: blockernormal

This is caused by r5783 changes, and does only happen when the "Steps properties" preset is loaded.
I don't know yet what is the best solution to this problem, but you have many possible workarounds in the meanwhile:

  1. Disable this preset from your preferences.xml if you don't use it (all stuff related to "Step properties" and "http://osmtools.de/josm/steps.xml")
  2. Keep it but remove this section in %APPDATA%/JOSM/cache/mirror_http___osmtools.de_josm_steps.xml:
    <item name="No handrail" de.name="Kein Geländer">
            <key key="handrail:left"/>
            <key key="handrail:right"/>
            <key key="handrail:center"/>
            <key key="handrail" value="no"/>
    </item>
    
  3. Switch back to JOSM 5779
  4. Use tomorrow's latest (r5791+), but the item above won't be available

Sorry for this inconvenience.

comment:4 by Don-vip, 11 years ago

Summary: can not startNPE when loading external preset "Step properties" with JOSM >= 5783

comment:5 by Don-vip, 11 years ago

Description: modified (diff)

comment:6 by stoecker, 11 years ago

Someone should tell the author that the preset is broken. What is the sense of <key> without value? Maybe he wants <key key="..." value=""> and relies on a josm bug?

comment:7 by Don-vip, 11 years ago

Resolution: fixed
Status: assignedclosed

In 5795/josm:

fix #8530 - Robustness to presets defining keys without value

in reply to:  6 comment:8 by Don-vip, 11 years ago

Replying to stoecker:

Someone should tell the author that the preset is broken.

I have sent an e-mail to User:Driver2.

comment:9 by Don-vip, 11 years ago

Got an answer :) In fact the wiki still refers to this behaviour:

This tag will always set a key to a specific value. key is required and if value is present, the key will be set. If value attribute is ommited, the key is removed.

The change in r5795 should keep this behaviour so there is no break in compatibility.

Modify Ticket

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