Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#5893 closed defect (fixed)

Null Pointer Exception while loding custom presets at start - JOSM hangs on splash screen

Reported by: Fabi2 Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

I currently try to write some prsets for the german healthcare system as I encountered this bug.

Snippet from the preferences file:

taggingpreset.sortmenu=true
taggingpreset.sources-list.0=resource://data/defaultpresets.xml.Internal Preset
taggingpreset.sources-list.1=http://josm.openstreetmap.de/raw-attachment/wiki/Presets/craft-1.xml.Vorlagen für Handwerker
taggingpreset.sources-list.2=/home/fabi/de-hc-preset2.xml.de-hc

This means the internal presets, the craft=* and my own presets should be loaded.

Bug-HOWTO:

  1. Activate the presets in the preferences, close JOSM and the make a restart.
  2. The error pops up on startup.
  3. JOSM hangs on the the splash screen, while "Hauptfenster erzeugen" (creating main window).
  4. JOSM must be killed.
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2011-01-31 02:31:14
Last Changed Author: stoecker
Revision: 3835
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2011-01-31 00:10:01 +0100 (Mon, 31 Jan 2011)
Last Changed Rev: 3835

Identification: JOSM/1.5 (3835 de)
Memory Usage: 151 MB / 3111 MB (113 MB allocated, but free)
Java version: 1.6.0_20, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Operating system: Linux

Plugin: AddrInterpolation
Plugin: DirectUpload
Plugin: SimplifyArea
Plugin: alignways
Plugin: dataimport
Plugin: download_along
Plugin: editgpx
Plugin: graphview
Plugin: mapdust
Plugin: measurement
Plugin: multipoly-convert
Plugin: openstreetbugs
Plugin: openvisible
Plugin: osmarender
Plugin: restart
Plugin: reverter
Plugin: tageditor
Plugin: undelete
Plugin: waypoint_search

java.lang.NullPointerException
	at org.openstreetmap.josm.tools.PresetTextComparator.compare(PresetTextComparator.java:12)
	at org.openstreetmap.josm.tools.PresetTextComparator.compare(PresetTextComparator.java:9)
	at java.util.Arrays.mergeSort(Arrays.java:1283)
	at java.util.Arrays.mergeSort(Arrays.java:1294)
	at java.util.Arrays.sort(Arrays.java:1223)
	at java.util.Collections.sort(Collections.java:176)
	at org.openstreetmap.josm.gui.tagging.TaggingPresetMenu.sortMenu(TaggingPresetMenu.java:89)
	at org.openstreetmap.josm.gui.tagging.TaggingPresetMenu.sortMenu(TaggingPresetMenu.java:84)
	at org.openstreetmap.josm.gui.preferences.TaggingPresetPreference.initialize(TaggingPresetPreference.java:287)
	at org.openstreetmap.josm.Main.<init>(Main.java:225)
	at org.openstreetmap.josm.gui.MainApplication.<init>(MainApplication.java:58)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:225)

Attachments (1)

de-hc-preset2.xml (9.1 KB ) - added by Fabi2 13 years ago.
My own preset for German the health care system.

Download all attachments as: .zip

Change History (3)

by Fabi2, 13 years ago

Attachment: de-hc-preset2.xml added

My own preset for German the health care system.

comment:1 by jttt, 13 years ago

Resolution: fixed
Status: newclosed

In [3839/josm]:

Fix #5893 Null Pointer Exception while loding custom presets at start - JOSM hangs on splash screen

comment:2 by jttt, 13 years ago

Problem is in your preset, every item and group needs to have name attribute.

Fixed is the NullPointerException and josm should now inform you that name is missing when you add the presets.

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.