Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

Exception Triggered when load CPU plugin

Pap__Thanasis
Beginner
606 Views

Hello,

I am experiencing an issue when I try to load the CPU plugin in my windows 10 application.

auto plugin = PluginDispatcher({L""}).getPluginByDevice("CPU");

exception.PNG

The debugger pops the exception at getSuitablePlugin method when access the first if statement (line 72@ie_plugin_dispatcher.hpp).

I am using MSVC2017 64bit for the build and Qt 5.11.1 in a Windows 10 machine.

Best Regards,

Thanasis

0 Kudos
1 Solution
Shubha_R_Intel
Employee
606 Views

Thanasis, did you make sure to build the Release version rather than the Debug within Visual Studio ? Debug comes up as default, which is why I'm asking.

You have to set Debug or Release appropriately in your bin/setupvars.bat .

Also for the environment variables to take effect within a Visual Studio session, you must:

1) open an x86 Native Tools Command Prompt for VS 2017

2) Run the batch file (which should be edited to be all Debug or all Release)

3) Run devenv /UseEnv

Thanks,

Shubha

View solution in original post

0 Kudos
3 Replies
Shubha_R_Intel
Employee
607 Views

Thanasis, did you make sure to build the Release version rather than the Debug within Visual Studio ? Debug comes up as default, which is why I'm asking.

You have to set Debug or Release appropriately in your bin/setupvars.bat .

Also for the environment variables to take effect within a Visual Studio session, you must:

1) open an x86 Native Tools Command Prompt for VS 2017

2) Run the batch file (which should be edited to be all Debug or all Release)

3) Run devenv /UseEnv

Thanks,

Shubha

0 Kudos
Pap__Thanasis
Beginner
606 Views

Shubha, I use QtCreator as IDE. The application run successfully only in release mode and yes, as you mentioned the release libraries cause the whole problem.

Thank you,

Thanasis

0 Kudos
Pap__Thanasis
Beginner
606 Views

I also paste the code from the .pro file if someone faces the same problem.

#OpenVino
INCLUDEPATH += $$PWD/inference_engine/include

CONFIG(release, debug|release):BuildVar=release
CONFIG(debug, debug|release):BuildVar=debug

equals(BuildVar,debug) {
    message(Debug Mode)
    LIBS += -L$$PWD/inference_engine/lib/intel64/Debug
    LIBS += -linference_engined
}

equals(BuildVar,release) {
    message(Release Mode)
    LIBS += -L$$PWD/inference_engine/lib/intel64/Release
    LIBS += -linference_engine
}

 

0 Kudos
Reply