Opened 13 years ago

Closed 11 years ago

#362 closed defect (fixed)

Rupture Selector GUI Bean has off-by-one error in rupture index param constraint

Reported by: keith@… Owned by: Peter Powers
Priority: major Milestone: OpenSHA 1.3
Component: sha Version: 1.2.3
Keywords: ScenarioShakeMapLocal Cc:

Description

Steps to reproduce: (PLEASE FILL IN)
See attached

Other info: (PLEASE FILL IN)

Application: ScenarioShakeMapLocal?
Version: 1.2.3
Bulid Type: Production
Java Version: 1.6.0_29 (Sun Microsystems Inc.)
Operating System: Windows 2003 (arch: x86, version: 5.2)

Exception:

java.lang.IndexOutOfBoundsException: Index: 16, Size: 16
	at java.util.ArrayList.RangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.opensha.sha.earthquake.rupForecastImpl.WGCEP_UCERF_2_Final.UnsegmentedSource.getRupture(UnsegmentedSource.java:1293)
	at org.opensha.sha.earthquake.AbstractERF.getRupture(AbstractERF.java:231)
	at org.opensha.sha.gui.beans.EqkRuptureFromERFSelectorPanel.getHypocenterLocationsForSelectedRupture(EqkRuptureFromERFSelectorPanel.java:379)
	at org.opensha.sha.gui.beans.EqkRuptureFromERFSelectorPanel.parameterChange(EqkRuptureFromERFSelectorPanel.java:512)
	at org.opensha.commons.param.AbstractParameter.firePropertyChange(AbstractParameter.java:387)
	at org.opensha.commons.param.AbstractParameter.setValue(AbstractParameter.java:208)
	at org.opensha.commons.param.editor.AbstractParameterEditor.setValue(AbstractParameterEditor.java:72)
	at org.opensha.commons.param.editor.impl.IntegerParameterEditor.focusLost(IntegerParameterEditor.java:203)
	at java.awt.AWTEventMulticaster.focusLost(Unknown Source)
	at java.awt.Component.processFocusEvent(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.a

Attachments (1)

Porter-28-Nov-2011-OpenSHA-ScenShakeMapBug[1].doc (166.5 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 11 years ago by Kevin Milner

Milestone: OpenSHA 1.3
Resolution: fixed
Status: newclosed
Summary: Bug in ScenarioShakeMapLocalRupture Selector GUI Bean has off-by-one error in rupture index param constraint

Fixed off by 1 bug that allowed for selecting a rupture index too high in rup selector gui bean (it was setting the max for the parameter constraint to numRuptures instead of (numRuptues-1). Fixed in [10266]

Note: See TracTickets for help on using tickets.