Modify

Opened 10 years ago

Closed 10 years ago

#4578 closed defect (fixed)

Warn about broken presets

Reported by: Luebeck Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

i create following present and get a global error message by start the present.

present:

<group name="Memorial" icon="memorial.png">

<item name="Stolperstein" icon="memorial.png">

<link href="http://wiki.openstreetmap.org" />
<!-- Ueberschrift -->
<label text="Stolperstein" />
<key key="historic" value="memorial" />
<text key="memorial" value="stolperstein"/>
<text key="name" text="Name" default="" delete_if_empty="true"/>
<text key="text" text="Text" default="" delete_if_empty="true"/>
<space />
<text key="addr:housenumber" text="House number" de.text="Hausnummer" default="" delete_if_empty="true" />
<optional>

<text key="addr:street" text="Street name" de.text="Strasse" use_last_as_default="true" delete_if_empty="true" />
<text key="addr:city" text="City name" de.text="Stadt" use_last_as_default="true" delete_if_empty="true" />
<text key="addr:postcode" text="Post code" de.text="Postleitzahl" use_last_as_default="true" delete_if_empty="true" />
<text key="addr:country" text="Country code" de.text="Länderkennung" use_last_as_default="true" delete_if_empty="true" />

</optional>

</item>

</group>

i would be nice to get a message with more information - error in present or something else.

error-message:
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2010-02-18 12:40:06
Last Changed Author: Gubaer
Revision: 3015
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2010-02-18 12:24:10 +0100 (Thu, 18 Feb 2010)
Last Changed Rev: 3015

Memory Usage: 43 MB / 1016 MB (15 MB allocated, but free)
Java version: 1.6.0, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows Vista

Dataset consistency test:
No problems found

Plugins: PicLayer,openstreetbugs,remotecontrol,walkingpapers,wmsplugin
Plugin walkingpapers Version: 19487
Plugin openstreetbugs Version: 19463
Plugin wmsplugin Version: 19626
Plugin PicLayer Version: 19467
Plugin remotecontrol Version: 19471

java.lang.NullPointerException

at org.openstreetmap.josm.tools.I18n.gettext(I18n.java:73)
at org.openstreetmap.josm.tools.I18n.tr(I18n.java:38)
at org.openstreetmap.josm.gui.tagging.TaggingPreset$Text.addToPanel(TaggingPreset.java:189)
at org.openstreetmap.josm.gui.tagging.TaggingPreset.createPanel(TaggingPreset.java:716)
at org.openstreetmap.josm.gui.tagging.TaggingPreset.actionPerformed(TaggingPreset.java:762)
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.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 (0)

Change History (3)

comment:1 Changed 10 years ago by mjulius

(In [3024]) don't try to translate null strings in TaggingPreset, see #4578

comment:2 Changed 10 years ago by mjulius

Summary: error by using own presentWarn about broken presets

The problem with your preset is that your first <text> element (<text key="memorial" ...) does not have a text= attribute. (I guess it was supposed to be a <key> element.)

At least since r3024 JOSM won't create an exception because of that anymore.

Anyway, I agree that JOSM should warn about incomplete/invalid presets - possibly on the console.

comment:3 Changed 10 years ago by stoecker

Resolution: fixed
Status: newclosed

Closing. There have been added some warnings. More will come when issues are detected. No need to have such a meta-ticket.

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.