draeger-lab / SBSCL

The Systems Biology Simulation Core Library (SBSCL) provides an efficient and exhaustive Java implementation of methods to interpret the content of models encoded in the Systems Biology Markup Language (SBML) and its numerical solution.
https://draeger-lab.github.io/SBSCL/
GNU Lesser General Public License v3.0
20 stars 13 forks source link

Errors are detected when running some SBMLTestSuite case. #74

Open TlexCypher opened 11 months ago

TlexCypher commented 11 months ago

I'd love to use sbscl.v.2.1, so I wrote the wrapper class for SBMLTestSuite using org.testsuite.SBMLTestSuiteRunnerWrapper. But in some SBMLTestSuite cases, the same error has been detected. Specifically, the case numbers are here.

Failed cases with same error: [00182 00184 00531 00532 00534 00535 00539 00540 00541 00542 00543 00545 00546 00549 00550 00551 00552 00553 00554 00555 00556 00557 00558 00559 00560 00561 00562 00563 00564 00565 00566 00567 00568 00569 00570 00571 00572 00573 00574 0057600613 00614 00615 00628 00629 00630 00658 00659 00660 00661 00662 00665 00666 00673 00674 00675 00687 00695 00696 00705 00760 00761 00762 00778 00779 00780 00876 00983 01054 01481 01502 01503 01539 01567 01793 01820 01821]

The error content is below.

java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
    at java.base/java.util.HashMap.putMapEntries(HashMap.java:495)
    at java.base/java.util.HashMap.putAll(HashMap.java:783)
    at org.sbml.jsbml.AbstractTreeNode.<init>(AbstractTreeNode.java:172)
    at org.sbml.jsbml.ASTNode.<init>(ASTNode.java:1639)
    at org.sbml.jsbml.ASTNode.clone(ASTNode.java:1914)
    at org.sbml.jsbml.ASTNode.<init>(ASTNode.java:1645)
    at org.sbml.jsbml.ASTNode.clone(ASTNode.java:1914)
    at org.simulator.sbml.AlgebraicRuleConverter.getAssignmentRules(AlgebraicRuleConverter.java:408)
    at org.simulator.sbml.EquationSystem.evaluateAlgebraicRules(EquationSystem.java:1216)
    at org.simulator.sbml.EquationSystem.init(EquationSystem.java:634)
    at org.simulator.sbml.SBMLinterpreter.init(SBMLinterpreter.java:442)
    at org.simulator.sbml.SBMLinterpreter.<init>(SBMLinterpreter.java:130)
    at org.testsuite.SBMLTestSuiteRunnerWrapper.runSBMLSimulation(SBMLTestSuiteRunnerWrapper.java:272)
    at org.testsuite.SBMLTestSuiteRunnerWrapper.main(SBMLTestSuiteRunnerWrapper.java:156)
    at main.CD5.Main.main(Unknown Source)

And also, I tried to use sbscl v.1.4, the error was not detected. If the wrapper shell scripts which I wrote are necessary, I'll share you. Any help, please.

draeger commented 10 months ago

@TlexCypher Thanks for raising and closing this issue. What solved the problem?

TlexCypher commented 10 months ago

Sorry, this problem is not solved, but this issues raised by jsbml. I'm going on solving this, so reopen this issue.

draeger commented 10 months ago

Thanks for this clarification. May I ask you to link the corresponding JSBML issue here? Thanks a lot!

TlexCypher commented 10 months ago

I wrote the error log in previous statement. But probably, JSBML' s previous version has not been revised that ASTNode Constructor.

SBSCL v.2.1 uses jsbml-v.1.6.1, but I think that in this version, ASTNode Constructor has been already revised. I checked the release-log of jsbml then, probably, in jsbml-1.0-beta-1, the resource of Problem, ASTNode constructor was implemented. And SBSCL uses maven to get jsbml-1.6.1. By my thinking, maven got jsbml-1.0-beta1, instead of jsbml-1.6.1. But I can't find out what is the resource of this problem. I'll try to revise this! Thank you for great help!

draeger commented 10 months ago

Thanks! I created a new issue in JSBML, see https://github.com/sbmlteam/jsbml/issues/258. What is needed is a new release of this library in Maven.

TlexCypher commented 10 months ago

I checked new issue of jsbml. I'm gonna try to make PR to new issue of jsbml! Thank you!

TlexCypher commented 10 months ago

@draeger This problem is raised only in case of using jsbml-1.6.1-newASTNode-with-dependencies.jar. Maven is not related. Sorry for my miss understanding. So, in conclusion, I changed jsbml jar file from jsbml-1.6.1-newASTNode-with-dependencies.jar to jsbml-1.6.1-with-dependencies.jar, this problem was not raised. So, this problem is detected only in case of using jsbml-1.6.1-newASTNode-with-dependencies.jar.

TlexCypher commented 10 months ago

Is it necessary to note this to https://github.com/sbmlteam/jsbml/issues/258 ?