Modify

Opened 10 years ago

Closed 10 years ago

#12506 closed defect (fixed)

IndexOutOfBoundsException when searching presets

Reported by: aaron_buesb_hotel@… Owned by: team
Priority: normal Milestone: 16.02
Component: Core Version:
Keywords: template_report regression Cc: simon04

Description

What steps will reproduce the problem?

  1. Go to Presets > Search presets.
  2. Start typing "wharf"

What is the expected result?

Search should proceed normally.

What happens instead?

Out of bounds exception when typing "a".

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-01-06 17:30:31 +0100 (Wed, 06 Jan 2016)
Build-Date:2016-01-06 16:32:31
Revision:9329
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9329 en) Windows 8.1 64-Bit
Memory Usage: 976 MB / 976 MB (216 MB allocated, but free)
Java version: 1.8.0_60, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Program arguments: [C:\Users\Aaron\Desktop\TEMP.joz]
Dataset consistency test: No problems found

Plugins:
- turnlanes (31772)
- turnrestrictions (31895)
- waydownloader (31772)
- wikipedia (31917)

Last errors/warnings:
- W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
- E: javax.script.ScriptException: TypeError: Cannot read property "0" from undefined in <eval> at line number 21. Cause: jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot read property "0" from undefined
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[node[ParameterFunction~equal(class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>),class java.lang.Object ParameterFunction~parent_tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>))] >LinkSelector{conditions=null} *[amenity][amenity'NEQ'parking]], declaration=Declaration [instructions=[throwWarning: ArrayFunction~tr(class java.lang.String <{0} inside {1}>,class java.lang.String ArrayFunction~concat(class java.lang.Object <amenity=>,class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>)),class java.lang.String ArrayFunction~concat(class java.lang.Object <amenity=>,class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>)));], idx=13]]], code=3000, message=amenity=school inside amenity=school]
- W: Unable to remove primitives from TestError [tester=MapCSSTagCheckerAndRule [rule=GroupedMapCSSRule [selectors=[node[ParameterFunction~equal(class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>),class java.lang.Object ParameterFunction~parent_tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>))] >LinkSelector{conditions=null} *[amenity][amenity'NEQ'parking]], declaration=Declaration [instructions=[throwWarning: ArrayFunction~tr(class java.lang.String <{0} inside {1}>,class java.lang.String ArrayFunction~concat(class java.lang.Object <amenity=>,class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>)),class java.lang.String ArrayFunction~concat(class java.lang.Object <amenity=>,class java.lang.Object ParameterFunction~tag(class org.openstreetmap.josm.gui.mappaint.Environment <amenity>)));], idx=13]]], code=3000, message=amenity=place_of_worship inside amenity=place_of_worship]
- E: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector$ResultListModel.getElementAt(TaggingPresetSelector.java:112)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector$ResultListModel.getElementAt(TaggingPresetSelector.java:101)
	at javax.swing.JList.getSelectedValue(Unknown Source)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector.filterPresets(TaggingPresetSelector.java:360)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector.access$100(TaggingPresetSelector.java:65)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector$1.insertUpdate(TaggingPresetSelector.java:233)
	at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
	at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
	at javax.swing.text.AbstractDocument.insertString(Unknown Source)
	at javax.swing.text.PlainDocument.insertString(Unknown Source)
	at javax.swing.text.AbstractDocument.replace(Unknown Source)
	at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
	at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(Unknown Source)
	at javax.swing.SwingUtilities.notifyAction(Unknown Source)
	at javax.swing.JComponent.processKeyBinding(Unknown Source)
	at javax.swing.JComponent.processKeyBindings(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(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

Attachments (0)

Change History (3)

comment:1 by Don-vip, 10 years ago

Cc: simon04 added
Summary: Error when searching presetsIndexOutOfBoundsException when searching presets

Cannot reproduce with:

Identification: JOSM/1.5 (9760 SVN en) Windows 10 64-Bit
Java version: 1.8.0_72-b15, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Could it have been fixed with r9422?

comment:2 by aaron_buesb_hotel@…, 10 years ago

Hi.

I just wish to add that I also can no longer reproduce the error. If I recall, I typed and erased some other phrases before typing the above phrase (without closing the dialog) when the error occurred.

comment:3 by simon04, 10 years ago

Keywords: regression added
Milestone: 16.02
Resolution: fixed
Status: newclosed

Yes, should be fixed due to r9422.

Regression of r9304 which in turn fixes another regression. :)

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.