Opened 13 years ago

Closed 13 years ago

#186 closed defect (fixed)

Bug in FaultSections

Reported by: timothy.dawson@… Owned by: Kevin Milner
Priority: major Milestone:
Component: fault DB Version:
Keywords: FaultSections Cc:

Description

Steps to reproduce: Kevin: There is a bug in the Fault Sections application. I was trying to edit the Fault Model and when I hit the "Update Model" button, I got an error message something like "....SQL command not properly ended". The bigger issue is that the application seems to overwrite the existing fault model so that it goes back to having none of the faults selected. Now I can't event tell which faults where originally in model F2.1 because it saved everything as unselected.

Other info: (PLEASE FILL IN)

Application: FaultSections?
Version: 1.0.2
Bulid Type: nightly

Exception:

java.lang.NullPointerException
	at org.opensha.refFaultParamDb.dao.db.FaultModelDB_DAO.getFaultSectionIdList(FaultModelDB_DAO.java:68)
	at org.opensha.refFaultParamDb.gui.addEdit.faultModel.AddEditFaultModel.getFaultSectionIdList(AddEditFaultModel.java:308)
	at org.opensha.refFaultParamDb.gui.addEdit.faultModel.AddEditFaultModel.setFaultSectionsBasedOnFaultModel(AddEditFaultModel.java:285)
	at org.opensha.refFaultParamDb.gui.addEdit.faultModel.AddEditFaultModel.parameterChange(AddEditFaultModel.java:277)
	at org.opensha.commons.param.Parameter.firePropertyChange(Parameter.java:381)
	at org.opensha.commons.param.Parameter.setValue(Parameter.java:214)
	at org.opensha.commons.param.editor.ParameterEditor.setValue(ParameterEditor.java:244)
	at org.opensha.commons.param.editor.ConstrainedStringParameterEditor.itemStateChanged(ConstrainedStringParameterEditor.java:255)
	at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1205)
	at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1253)
	at javax.swing.JComboBox.contentsChanged(JComboBox.java:1309)
	at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:100)
	at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:88)
	at javax.swing.JComboBox.setSelectedItem(JComboBox.java:557)
	at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:603)
	at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:830)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
	at java.awt.Component.processMouseEvent(Component.java:6374)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
	at com.apple.laf.AquaComboBoxPopup$1.processMouseEvent(AquaComboBoxPopup.java:129)
	at java.awt.Component.processEvent(Component.java:6139)
	at java.awt.Container.processEvent(Container.java:2085)
	at java.awt.Component.dispatchEventImpl(Component.java:4736)
	at java.awt.Container.dispatchEventImpl(Container.java:2143)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
	at java.awt.Container.dispatchEventImpl(Container.java:2129)
	at java.awt.Window.dispatchEventImpl(Window.java:2478)
	at java.awt.Component.dispatchEvent(Component.java:4566)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:680)
	at java.awt.EventQueue.access$000(EventQueue.java:86)
	at java.awt.EventQueue$1.run(EventQueue.java:639)
	at java.awt.EventQueue$1.run(EventQueue.java:637)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
	at java.awt.EventQueue$2.run(EventQueue.java:653)
	at java.awt.EventQueue$2.run(EventQueue.java:651)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Change History (2)

comment:1 Changed 13 years ago by Kevin Milner

Tim, thanks for the bug report. I'm working on it right now.

Ned: Was this database migrated from MySQL to Oracle at some point? The code for updating fault models uses MySQL syntax that isn't compatible with Oracle. It was either never used/tested previously, or applied to an old (MySQL) version of the database. I'm in the process of updating it.

comment:2 Changed 13 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

Tim,

I've fixed this particular bug, I also re-populated the DB for FM 2.1 (including the new 2011 one you created) with the values from the old UCERF2 database.

Your application should update next time you launch it, if it doesn't (no download bar appears), re-launch it from this address:

http://opensha.usc.edu/apps/opensha/FaultSections/nightly/FaultSections.jnlp

Thanks!
Kevin

Note: See TracTickets for help on using tickets.