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

Runtime error when executing a Reaktoro application compiled with MSVC in Debug mode and relying on yaml-cpp compiled in Release mode #318

Open
allanleal opened this issue Aug 14, 2023 · 0 comments

Comments

@allanleal
Copy link
Collaborator

Issue Description

Reaktoro relies on the yaml-cpp library to parse YAML formatted files and strings. However, a critical issue arises when a Reaktoro application is executed under specific circumstances, leading to execution failure. The problem occurs when the following combination of factors is present:

  1. The yaml-cpp library is compiled with MSVC (Microsoft Visual C++) in Release mode. For instance, if you're using the yaml-cpp version provided by conda-forge, this scenario is typical.
  2. The Reaktoro application is compiled with MSVC in Debug mode.
  3. The Reaktoro application involves the parsing of YAML files or strings, such as when constructing a SupcrtDatabase object with the argument "supcrtbl". This triggers the parsing of the embedded YAML file supcrt98.yaml through the yaml-cpp library.

The specific point of failure is observed during the invocation of the YAML::Load function of yaml-cpp. Interestingly, the issue does not happen if yaml-cpp is compiled in Debug mode with MSVC. The application executes correctly and error-free.

Steps to Reproduce

To replicate the issue, follow these steps:

  1. Compile the yaml-cpp library with MSVC in Release mode.
  2. Compile a Reaktoro application with MSVC in Debug mode.
  3. Within the Reaktoro application, involve the parsing of YAML files or strings using functions that use yaml-cpp, such as SupcrtDatabase("supcrtbl").

Expected Behavior

The Reaktoro application should execute successfully regardless of the compilation mode of the yaml-cpp library and the application itself. The YAML::Load function should perform the YAML parsing correctly, ensuring proper communication between Reaktoro and yaml-cpp.

Actual Behavior

Under the specific combination of circumstances mentioned above, the Reaktoro application encounters execution failure.

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

No branches or pull requests

1 participant