Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

Creating an Nx Witness VMS plugin with the latest ONNX Runtime causes repeated abnormal restarts.

Answered

Comments

1 comment

  • Andrey Terentyev
    • Network Optix team

    Hello,

    There are several general notes to draw your attention to before going into code details.

    - Your SDK and Server version differ. That might cause failures if your plugin used SDK features the Server doesn't support.

    - The latest version supported is MSVC Build Tools and compiler 14.38. Newer versions can cause failures. It's not mentioned in the readme.md yet. We're going to update it soon.

    - place plugin binary and its dependent binaries in a separate directory as described here https://meta.nxvms.com/docs/developers/knowledgebase/235-step-3-adding-object-detection in the "Organizing third-party library files" section.

    Try to remove code

     m_ortEnv = std::make_unique<Ort::Env>(
        OrtLoggingLevel::ORT_LOGGING_LEVEL_ERROR, "Foobar"
      );

    out of the DeviceAgent class constructor. It would be easier to debug it.

    Having taken a look at your cmake file, I guess the issues might be caused linking wrong .lib files.

    The line links libraries statically to the resulting binary
    target_link_libraries(opencv_object_detection_analytics_plugin nx_kit nx_sdk ${deps})

    meanwhile above in the file 

    set(deps ${deps} ${onnxRuntimeDir}/lib/onnxruntime_providers_shared.lib)

    makes me think the .lib is shared, i.e. a one to be linked dynamically. 

    I guess, in the version 1.24.1 implied linking type might be different from the one you expect.

     

    0

Please sign in to leave a comment.