Opened 7 years ago

Closed 7 years ago

Last modified 7 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:
Build-Date: 2013-03-21 02:33:54
Last Changed Author: Don-vip
Revision: 5789
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
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>(
	at org.openstreetmap.josm.gui.MainApplication.<init>(
	at org.openstreetmap.josm.gui.MainApplication.main(
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>(
	... 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.Main$
	at org.openstreetmap.josm.Main$
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$ Source)
	at Source)

Attachments (0)

Change History (9)

comment:1 Changed 7 years ago by Don-vip

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

comment:2 Changed 7 years ago by Don-vip

In 5791/josm:

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

comment:3 Changed 7 years ago by Don-vip

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 "")
  2. Keep it but remove this section in %APPDATA%/JOSM/cache/mirror_http___osmtools.de_josm_steps.xml:
    <item name="No handrail""Kein Geländer">
            <key key="handrail:left"/>
            <key key="handrail:right"/>
            <key key="handrail:center"/>
            <key key="handrail" value="no"/>
  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 Changed 7 years ago by Don-vip

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

comment:5 Changed 7 years ago by Don-vip

Description: modified (diff)

comment:6 Changed 7 years ago by stoecker

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 Changed 7 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 5795/josm:

fix #8530 - Robustness to presets defining keys without value

comment:8 in reply to:  6 Changed 7 years ago by Don-vip

Replying to stoecker:

Someone should tell the author that the preset is broken.

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

comment:9 Changed 7 years ago by Don-vip

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
as closed The owner will remain Don-vip.
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.