Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading file #245

Closed
cjmyers opened this issue Apr 20, 2022 · 0 comments · Fixed by #247
Closed

Error reading file #245

cjmyers opened this issue Apr 20, 2022 · 0 comments · Fixed by #247
Labels

Comments

@cjmyers
Copy link

cjmyers commented Apr 20, 2022

When running using this method: SBMLReader.read(FILE) to read the file Simulation_Environment.xml in the attached Zip file, with either 1.6.0-SNAPSHOT or 1.6.1, we get the exception below. However, there was no error for an earlier version of 1.6.0-SNAPSHOT.

Reading: /Users/myers/Downloads/Simulation_Environment/Simulation_Environment.xml
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
at java.base/java.util.Objects.checkIndex(Objects.java:372)
at java.base/java.util.ArrayList.get(ArrayList.java:459)
at org.sbml.jsbml.util.compilers.UnitsCompiler.lambda(UnitsCompiler.java:905)
at org.sbml.jsbml.ASTNode.compile(ASTNode.java:2225)
at org.sbml.jsbml.ASTNode.deriveUnit(ASTNode.java:2356)
at org.sbml.jsbml.ASTNode.astNodeToTree(ASTNode.java:4601)
at org.sbml.jsbml.ASTNode.addChild(ASTNode.java:1825)
at org.sbml.jsbml.xml.parsers.MathMLStaxParser.processStartElement(MathMLStaxParser.java:568)
at org.sbml.jsbml.xml.stax.SBMLReader.processStartElement(SBMLReader.java:1004)
at org.sbml.jsbml.xml.stax.SBMLReader.readXMLFromXMLEventReader(SBMLReader.java:767)
at org.sbml.jsbml.xml.stax.SBMLReader.readXMLFromStream(SBMLReader.java:592)
at org.sbml.jsbml.xml.stax.SBMLReader.readSBML(SBMLReader.java:306)
at org.sbml.jsbml.SBMLReader.readSBML(SBMLReader.java:116)
at org.sbml.jsbml.SBMLReader.read(SBMLReader.java:105)
at org.sbml.jsbml.SBMLReader.read(SBMLReader.java:92)
at edu.utah.ece.async.ibiosim.analysis.Analysis.runSEDML(Analysis.java:416)
at edu.utah.ece.async.ibiosim.analysis.Analysis.performAnalysis(Analysis.java:256)
at edu.utah.ece.async.ibiosim.analysis.Analysis.main(Analysis.java:231)

Simulation_Environment.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants