INTO-CPS-Association / maestro

Maestro a Co-Simulation Orchestration Engine
20 stars 3 forks source link

NullPoint Exception from cosimulation scenario #406

Open clagms opened 1 year ago

clagms commented 1 year ago

The following scenario results in null pointer exception and I was not able to assess the cause.

scenario_null_point_exception.zip

To reproduce:

  1. Get maestro jar with dependencies into the local_cosim folder.
  2. Cd into folder
  3. Run java -jar maestro.jar sigver generate-algorithm scenario.conf -output results --> Should be ok and generate
  4. Run java -jar maestro.jar sigver execute-algorithm -mm multiModel.json -ep executionParameters.json -al results/masterModel.conf -output results -di -vim FMI2
  5. Get the error below.

The problem here might be between the chair and the screen, but at least we ought to produce a nice error message to help the user figure out what it is.

PS C:\work\gitlab\project_digit-bench-dlte\claudio\distributed_model_tunning_example\decoupled_model_cosim\maestro_cli\local_cosim> java -jar maestro.jar sigver execute-algorithm -mm multiModel.json -ep executionParameters.json -al results/masterModel.conf -output results -di -vim FMI2
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
java.lang.NullPointerException
        at org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment.initialize(Fmi2SimulationEnvironment.java:186)
        at org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment.<init>(Fmi2SimulationEnvironment.java:38)
        at org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment.of(Fmi2SimulationEnvironment.java:48)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.getConfigFromMultiModel(SigverCmd.java:375)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.call(SigverCmd.java:268)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.call(SigverCmd.java:183)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment.<init>(Fmi2SimulationEnvironment.java:38)
        at org.intocps.maestro.framework.fmi2.Fmi2SimulationEnvironment.of(Fmi2SimulationEnvironment.java:48)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.getConfigFromMultiModel(SigverCmd.java:375)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.call(SigverCmd.java:268)
        at org.intocps.maestro.cli.ExecuteAlgorithmCmd.call(SigverCmd.java:183)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.intocps.maestro.Main.main(Main.java:19)