vectorgrp / sil-kit

Vector SIL Kit – Open-Source Library for Connecting Software-in-the-Loop Environments
https://vectorgrp.github.io/sil-kit-docs
MIT License
107 stars 32 forks source link

program crashes without apparent reason when instantiating SilKit::Config::ParticipantConfigurationFromFile object #9

Closed fskoras closed 11 months ago

fskoras commented 11 months ago

Describe the issue I was trying to compile a simple example program from provided documentation "Developer Guide" chapter. I am using vscode with cmake extension configuring visual studio 17 2022 toolchain

To Reproduce follow the tutorial from documentation in specified environment

Expected behavior A clear and concise description of what you expected to happen. I expect executable not to crash

Screenshots

CMakeLists.txt

image

simple.cpp

image

GDB output

image

Your Environment (please complete the following information):

Additional context

When I try to compile the program with config object the program crash right after startup. That means I am not even able to create a breakpoint in line 14 to see whats going on.

MariusBgm commented 11 months ago

Hi @fskoras , the Windows return code 0xC0000134 means DLL not found (STATUS_DLL_NOT_FOUND). When you run your sample exeucutable, make sure that you have SilKit.dll in the same folder, or the path containing it is in your PATH variable. That is not a crash in SilKit, it's Windows unable to load the dependencies. Hope that helps

fskoras commented 11 months ago

You are correct, that was it. I was just surprised I didn't receive any notification from the operating system that the dll failed to load. thank you for your help

MariusBgm commented 11 months ago

Great that it works for you. For what it's worth, If you start the executable in an explorer window you should get a pop-up dialog with an error message, if you run it in a shell or debugger, it doesn't show...