opensha / opensha-apps

OpenSHA GUI Apps
Apache License 2.0
4 stars 4 forks source link

UCERF3 ERFs fail when downloaded data files are corrupted or truncated #6

Closed BabakGhods closed 4 years ago

BabakGhods commented 4 years ago

Steps to reproduce: (PLEASE FILL IN)

Other info: (PLEASE FILL IN)

Application: UCERF3 Single Branch ERF Version: 1.5.0 Bulid Type: Development Java Version: 1.8.0_231 (Oracle Corporation) Operating System: Windows 7 (arch: amd64, version: 6.1)

Exception:


java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.opensha.commons.util.ExceptionUtils.asRuntimeException(ExceptionUtils.java:26)
    at org.opensha.sha.earthquake.ERF_Ref.instance(ERF_Ref.java:205)
    at org.opensha.sha.gui.beans.ERF_GuiBean.getERFInstance(ERF_GuiBean.java:168)
    at org.opensha.sha.gui.beans.ERF_GuiBean.parameterChange(ERF_GuiBean.java:496)
    at org.opensha.commons.param.AbstractParameter.firePropertyChange(AbstractParameter.java:386)
    at org.opensha.commons.param.AbstractParameter.setValue(AbstractParameter.java:210)
    at org.opensha.commons.param.editor.AbstractParameterEditor.setValue(AbstractParameterEditor.java:75)
    at org.opensha.commons.param.editor.impl.ConstrainedStringParameterEditor.itemStateChanged(ConstrainedStringParameterEditor.java:99)
    at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
    at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
    at javax.swing.JComboBox.contentsChanged(Unknown Source)
    at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
    at javax.swing.DefaultComboBoxModel.setSelectedItem(Unknown Source)
    at javax.swing.JComboBox.setSelectedItem(Unknown Source)
    at javax.swing.JComboBox.setSelectedIndex(Unknown Source)
    at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouse
kevinmilner commented 4 years ago

Thanks for the report! Unfortunately the exception stack trace was truncated before the part that helps us figure out what happened. Would you mind re-running it from a terminal to recreate the exception, and then pasting the full command line output here? Thanks!

BabakGhods commented 4 years ago

DearMr. Milner

Thankyou very much for your response. I think/hope I did what you asked me to do. Youcan find the full command line output in the attached text file. Please let meknow if you need anything else.

Thankyou in advance

Sincerelyyours

BabakGhods


Babak Ghods, Ph.D. student  in Structural and Earthquake Engineering Department of Civil Engineering, Sharif University of Technology, Tehran, Iran. Tel.  (+98)912-331-9929 Email: ce_babakghods@yahoo.com Linkedin: https://www.linkedin.com/pub/babak-ghods/61/5a2/213


On Friday, August 7, 2020, 10:41:41 PM GMT+4:30, Kevin Milner <notifications@github.com> wrote:  

Thanks for the report! Unfortunately the exception stack trace was truncated before the part that helps us figure out what happened. Would you mind re-running it from a terminal to recreate the exception, and then pasting the full command line output here? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Babak>cd: C:\Program Files\Java The filename, directory name, or volume label syntax is incorrect.

C:\Users\Babak>java -jar C:\Users\Babak\Desktop HazardCurveGUI-1.5.0.jar Error: Unable to access jarfile C:\Users\Babak\Desktop

C:\Users\Babak>java -jar C:\Users\Babak\Desktop\HazardCurveGUI-1.5.0.jar init: Epistemic List Control java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.opensha.commons.util.ExceptionUtils.asRuntimeException(ExceptionU tils.java:26) at org.opensha.sha.earthquake.ERF_Ref.instance(ERF_Ref.java:205) at org.opensha.sha.gui.beans.ERF_GuiBean.getERFInstance(ERF_GuiBean.java :168) at org.opensha.sha.gui.beans.ERF_GuiBean.parameterChange(ERF_GuiBean.jav a:496) at org.opensha.commons.param.AbstractParameter.firePropertyChange(Abstra ctParameter.java:386) at org.opensha.commons.param.AbstractParameter.setValue(AbstractParamete r.java:210) at org.opensha.commons.param.editor.AbstractParameterEditor.setValue(Abs tractParameterEditor.java:75) at org.opensha.commons.param.editor.impl.ConstrainedStringParameterEdito r.itemStateChanged(ConstrainedStringParameterEditor.java:99) at javax.swing.JComboBox.fireItemStateChanged(Unknown Source) at javax.swing.JComboBox.selectedItemChanged(Unknown Source) at javax.swing.JComboBox.contentsChanged(Unknown Source) at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source) at javax.swing.DefaultComboBoxModel.setSelectedItem(Unknown Source) at javax.swing.JComboBox.setSelectedItem(Unknown Source) at javax.swing.JComboBox.setSelectedIndex(Unknown Source) at javax.swing.plaf.basic.BasicComboPopup$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 javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(Unknown So urce) 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$JavaSecurityAccessImpl.doIntersectionP rivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP rivilege(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$JavaSecurityAccessImpl.doIntersectionP rivilege(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) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou

rce) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.opensha.sha.earthquake.ERF_Ref.instance(ERF_Ref.java:202) ... 47 more Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(Unknown Source) at java.util.zip.ZipFile.(Unknown Source) at java.util.zip.ZipFile.(Unknown Source) at scratch.UCERF3.CompoundFaultSystemSolution.fromZipFile(CompoundFaultS ystemSolution.java:318) at scratch.UCERF3.erf.UCERF3_CompoundSol_ERF.loadFetcher(UCERF3_Compound Sol_ERF.java:85) at scratch.UCERF3.erf.UCERF3_CompoundSol_ERF.(UCERF3_CompoundSol_E RF.java:95) ... 52 more

kevinmilner commented 4 years ago

OK, that is probably due to a prior corrupted download of model data.

The first time you try to run the app with a UCERF3 model, it downloads a zip file containing the full model, and it's having trouble loading that file. One possibility is that the first time it tried to download that file, it was interrupted and the file is incomplete (and thus corrupted). It looks like you're on Windows, so navigate to:

C:\Users\.opensha\ucerf3_erf

You should see a file called 'full_ucerf3_compound_sol.zip' there that is supposed to be 829,144 KB in size. Try deleting it and running again to let it attempt to re-download it. Or you can manually download that file from here:

http://opensha.usc.edu/ftp/mean_ucerf3/full_ucerf3_compound_sol.zip

...and place it in that location. Give it a try and let me know how it works. Either way, I'll leave this issue open as a reminder to add error detection and re-downloading of model data.

BabakGhods commented 4 years ago

Dear Mr. Milner

Thank you very much for yourresponse. Yes, you were right, it was the corrupted file. I downloaded itmanually and it worked. Thanks again, you are life saver!

Sincerely yours

Babak Ghods


Babak Ghods, Ph.D. student  in Structural and Earthquake Engineering Department of Civil Engineering, Sharif University of Technology, Tehran, Iran. Tel.  (+98)912-331-9929 Email: ce_babakghods@yahoo.com Linkedin: https://www.linkedin.com/pub/babak-ghods/61/5a2/213


On Saturday, August 8, 2020, 11:20:21 AM GMT+4:30, Babak Ghods <ce_babakghods@yahoo.com> wrote:  

DearMr. Milner

Thankyou very much for your response. I think/hope I did what you asked me to do. Youcan find the full command line output in the attached text file. Please let meknow if you need anything else.

Thankyou in advance

Sincerelyyours

BabakGhods


Babak Ghods, Ph.D. student  in Structural and Earthquake Engineering Department of Civil Engineering, Sharif University of Technology, Tehran, Iran. Tel.  (+98)912-331-9929 Email: ce_babakghods@yahoo.com Linkedin: https://www.linkedin.com/pub/babak-ghods/61/5a2/213


On Friday, August 7, 2020, 10:41:41 PM GMT+4:30, Kevin Milner <notifications@github.com> wrote:  

Thanks for the report! Unfortunately the exception stack trace was truncated before the part that helps us figure out what happened. Would you mind re-running it from a terminal to recreate the exception, and then pasting the full command line output here? Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kevinmilner commented 4 years ago

I'm glad that this worked for you, and thanks again for submitting the bug report.

I have merged in a fix for the UCERF3 ERFs which now checks for corrupted/truncated data files and gives the user an option to delete and re-download. That fix made it into the new app release: v1.5.1. Closing this issue now.