open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
61 stars 10 forks source link

Process hangs when loading OspSystemStructure.xml with invalid parameter name #597

Closed ljamt closed 4 years ago

ljamt commented 4 years ago

Have not done any debugging with libcosim, but experiencing the following in the applications.

Cosim Demo App: Application hangs when loading a OspSystemStructure.xml defining initial value for a non-existing variable. Invalid configuration should have been detected and error message given to the user.

cosim application hangs on cosim run path-to-invalid-config

ljamt commented 4 years ago

Experiencing the same when testing with cosim, so I'll moving this issue to libcosim.

eidekrist commented 4 years ago

I have tested this with the following Windows builds:

I cannot reproduce this with an OspSystemStructure.xml specifying an initial value for a non-existing variable. Do you have a setup you can share?

ljamt commented 4 years ago

Do you have a setup you can share?

Sent you an example by email.

eidekrist commented 4 years ago

Sent you an example by email.

From debugging it looks like our old friend terminate before initialize. Some FMU's don't handle this very well, and I think that is what is happening here. It should be solvable by validating initial values before loading FMUs.