Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

OpenVino Library integration cause unexpected crash onStart.



  • After successfully installed and tested some examples in OpenVino Library I tried to implement my first example in Qt 5.11.1 with MSVC2017 64bit in order to integrate it in my main Windows 10 application. Unfortunately the program crashes before even setups the ui. There is probably a library missing but I followed exactly Intel's documentation.

    .pro file

    #...
    #Compiler Flags
    QMAKE_CXXFLAGS+= -openmp
    
    #OpenVino
    INCLUDEPATH += $$PWD/Dependencies/include
    LIBS += -L$$PWD/Dependencies/libs
    LIBS += -linference_engine -llibiomp5md -lcpu_extension -lformat_reader
    

    in mainwindow.cpp I call

    InferenceEngine::GetInferenceEngineVersion();
    

    Any ideas?
    Thank you.



  • After restarting my PC the application run! It seems that the environment variables that I setup took place after system's reboot. I cannot figure out some other reason that cause that kind of error.

    @koahnig
    Appreciate your help mate!



  • @tpap

    Hi and welcome to devnet forum

    Are you using qt creator?
    Can you start the debugger with the program when it is compiled with debug option?
    If so, try to set a break at the very first statement in main.cpp.



  • @koahnig

    Hi,

    I am using qt creator and I run it in debug mode without success. Even if I put the breakpoint in main.cpp above MainWindow declaration I always got the following message:
    Unexpected CDB Exit
    "The CDB process terminated."

    I tried to run the executable from the debug folder by adding the appropriate dll files. Surprisingly the application successfully run!

    I switched to Release mode but the problem still remains.

    Thank you.



  • @tpap

    Did you rerun qmake and rebuilt the whole application after switching to release mode?

    I am using MinGW tool chain. Possibly someone with msvc experience is required to give you some help.



  • @koahnig
    Yes, I clean and rebuilt the whole project.

    I also test it with MinGWx64 and I got the error:

    Executable Failed
    "During startup program exited with code 0xc0000135."



  • @tpap

    Are you using different global instances of objects which are dependent and interacting during startup?

    IIRC I had that kind of message when the sequence of initialization is unclear. A small change suddenly blows up everything.

    Are you using global instances of objects?



  • @koahnig

    I just started a new Qt Widgets application. Beside the code I mentioned all the other stuff is the default template for this kind of applications. I just

    #include <inference_engine.hpp>
    

    in mainwindow.h and call

    InferenceEngine::GetInferenceEngineVersion()->buildNumber
    

    printed on a QLabel.

    Note: The successful run (as executable-mentioned before) prints out correctly the Inference Engine Version.



  • @tpap

    What versions are you using with last successful run?

    Are you using always prebuilds of Qt?

    Note that in most cases the compiler versions of the prebuild and what you are using afterwards need to match.
    Do you use a prebuild for OpenVino as well?
    Does the compiler used there match with the compiler of Qt libs?

    I saw above that you are using apparently MinGW 64 bit compiler. The Qt prebuild for version 5.11.x is 32 bit while starting with Qt5.12 the 64 bit version is used. Ensure that correct versions are used as toolchains.



  • @koahnig
    OpenVino supports MSVC2017 but it isn't clear about MinGW. I use MinGWx64 with a custom build for Qt 5.5. Both compilers (with their corresponding kits) are working properly (I checked again previous projects for each kit).

    I don't think that is a compiler/kit problem but some library that is missing and/or doesn't link.



  • @tpap

    I had a quick look on the OpenVino webpage. It looks like the toolkit is already in its binary form and compiled for MSVC2015 and MSVC2017. AFAIK those are the only MSVC version where a single set of libraries may be used. The binaries for any other MSVC compiler are not bit compatible. Also MinGW is not bit compatible with MSVC2015/2017.



  • @koahnig
    You are right. The problem hit with MSVC2017 64bit compiler. I am struggling with this all day and I couldn't find something till now. I am not using MinGW for this project, I just checked it because you mentioned it.
    P.S. Thank you for your effort.



  • After restarting my PC the application run! It seems that the environment variables that I setup took place after system's reboot. I cannot figure out some other reason that cause that kind of error.

    @koahnig
    Appreciate your help mate!


Log in to reply