Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12298 closed defect (fixed)

ArrayIndexOutOfBoundsException when adding tag to empty TagTable

Reported by: dr.kludge.gm@… Owned by: Upliner
Priority: normal Milestone: 16.01
Component: Core Version: tested
Keywords: Building Tools ArrayIndexOutOfBoundsException TagTable Cc:

Description

I tried to change my building tags and errored out. I am guessing because of the same error.

This left me with no tags;
0 in "Buildings width:"
0 in "Length step:"
Checked "Use address nodes under buildings"

I then when to add revised tags with this sequence
1.) Menu -> Data
2.) Set Building Size.
3.) Advanced Button
4.) Click on the + button to add a new key/value pair.

The + button mouse click produces a repeatable error.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2015-12-31 13:54:58 +0100 (Thu, 31 Dec 2015)
Build-Date:2015-12-31 12:57:00
Revision:9229
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9229 en) Windows 7 64-Bit
Memory Usage: 998 MB / 998 MB (722 MB allocated, but free)
Java version: 1.8.0_31, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-XX:ReservedCodeCacheSize=12M, -XX:NumberOfGCLogFiles=10, -XX:GCLogFileSize=8K, -Djosm.home=\gis\apps\josm, -Djosm.pref=\gis\apps\josm, -Djosm.cache=\gis\data\josm_temp, -Djosm.userdata=\gis\apps\josm\data_files]

Plugins:
- ColorPlugin (1414145445)
- CommandLine (31869)
- Create_grid_of_ways (31772)
- DirectDownload (31772)
- DirectUpload (31871)
- DxfImport (1006)
- FastDraw (31772)
- FixAddresses (31772)
- HouseNumberTaggingTool (31772)
- ImageWayPoint (31772)
- ImportImagePlugin (31772)
- ImproveOsm (18)
- Mapillary (31884)
- OpeningHoursEditor (31772)
- PicLayer (31772)
- RoadSigns (31772)
- ShapeTools (1000)
- alignways (31772)
- apache-commons (31772)
- apache-http (31875)
- buildings_tools (31895)
- conflation (0.1.9)
- continuosDownload (1446070193)
- dataimport (31772)
- download_along (31772)
- editgpx (31772)
- ejml (31772)
- ext_tools (31772)
- geotools (31774)
- graphview (31772)
- imageryadjust (31772)
- jna (31877)
- jts (31772)
- junctionchecking (31772)
- kendzi3d-jogl (41)
- lakewalker (31772)
- log4j (31879)
- mbtiles (v2.0)
- measurement (31772)
- namemanager (31772)
- opendata (31772)
- openvisible (31772)
- osmarender (31772)
- pbf (31772)
- pdfimport (31772)
- photo_geotagging (31772)
- photoadjust (31772)
- poly (31772)
- print (31772)
- proj4j (31772)
- public_transport (31772)
- public_transport_layer (31772)
- reltoolbox (31772)
- reverter (31772)
- routes (31772)
- routing (31772)
- scoutsigns (71)
- scripting (30722)
- tageditor (31772)
- tagging-preset-tester (31772)
- todo (29154)
- touchscreenhelper (31772)
- turnlanes (31772)
- turnrestrictions (31772)
- undelete (31772)
- utilsplugin2 (31890)
- waydownloader (31772)
- wikipedia (31866)

Last errors/warnings:
- E: Failed to locate image 'images/styles/standard/misc/information.png'
- W:  Is In: Could not get presets icon images/styles/standard/misc/information.png
- E: Failed to locate image 'images/styles/standard/misc/information.png'
- W:  Wind Generator: Could not get presets icon images/styles/standard/misc/information.png
- E: java.lang.ArrayIndexOutOfBoundsException: -1

java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.openstreetmap.josm.gui.tagging.TagEditorModel.getValueAt(TagEditorModel.java:132)
	at org.openstreetmap.josm.gui.tagging.TagTable$AddAction.run(TagTable.java:300)
	at org.openstreetmap.josm.gui.dialogs.relation.RunnableAction.actionPerformed(RunnableAction.java:15)
	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.plaf.basic.BasicButtonListener.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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(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.pumpEventsForFilter(Unknown Source)
	at java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:502)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:290)
	at buildings_tools.AdvancedSettingsDialog.<init>(AdvancedSettingsDialog.java:39)
	at buildings_tools.BuildingSizeDialog$1.actionPerformed(BuildingSizeDialog.java:44)
	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.plaf.basic.BasicButtonListener.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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(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.pumpEventsForFilter(Unknown Source)
	at java.awt.WaitDispatchSupport$2.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.awt.WaitDispatchSupport$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(Unknown Source)
	at java.awt.Dialog.show(Unknown Source)
	at java.awt.Component.show(Unknown Source)
	at java.awt.Component.setVisible(Unknown Source)
	at java.awt.Window.setVisible(Unknown Source)
	at java.awt.Dialog.setVisible(Unknown Source)
	at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:502)
	at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:290)
	at buildings_tools.BuildingSizeDialog.<init>(BuildingSizeDialog.java:53)
	at buildings_tools.BuildingSizeAction.actionPerformed(BuildingSizeAction.java:24)
	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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(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 (4)

comment:1 by dr.kludge.gm@…, 9 years ago

Oh! I just tried this work around:
1.) Select an existing building.
2.) Select all the keys/values.
3.) Right click in the key/value window.
4.) Click the copy all keys/values buttons.
5.) Menu -> Data
6.) Set Building Size.
7.) Advanced Button
8.) This time click on the three + button (Paste tags from buffer).
9.) Click OK button
10.) Click OK button.

The tags can be adjusted.

If I remove all the tags and OK; OK; to save, then I can reproduce the problem.
ERROR: java.lang.ArrayIndexOutOfBoundsException: -1
java.lang.ArrayIndexOutOfBoundsException: -1

at java.util.ArrayList.elementData(Unknown Source)
at java.util.ArrayList.get(Unknown Source)

...

comment:2 by simon04, 9 years ago

Resolution: fixed
Status: newclosed

In 9319/josm:

fix #12298 - ArrayIndexOutOfBoundsException when adding tag to empty TagTable

comment:3 by simon04, 9 years ago

Component: Plugin building_toolsCore
Keywords: TagTable added
Milestone: 16.01
Summary: Updated to 9229 and updated plugins: Cannot adjust building tools default setting because of "java.lang.ArrayIndexOutOfBoundsException: -1"ArrayIndexOutOfBoundsException when adding tag to empty TagTable

comment:4 by dr.kludge.gm@…, 9 years ago

Thank you for correcting the issue.

Modify Ticket

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