The problem is on the server with OS Windows Server 2016
aropb opened this issue · comments
Hi,
I really liked your product. It runs fast on Windows 10 and Linux Debian. But it doesn't run on Windows Server 2016.
I really hope for a solution to the problem.
Thanks.
Errors:
-
Error in System log:
Faulting module name: tbbbind_2_5.dll, version: 2021.2.2.0, time stamp: 0x6454504a
Exception code: 0xc0000005
Fault offset: 0x0000000000002c2b -
I removed tbbbind* DLLs:
The type initializer for 'Sdcb.OpenVINO.Natives.NativeMethods' threw an exception.
System.TypeInitializationException: The type initializer for 'Sdcb.OpenVINO.Natives.NativeMethods' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader' threw an exception.
---> System.DllNotFoundException: Unable to load native library: openvino_c.dll, dependencies status:
openvino.dll:0at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.LoadWithDeps(Assembly assembly, Nullable`1 searchPath, LibDeps[] libDeps) at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.OpenVINOImportResolver(String libraryName, Assembly assembly, Nullable`1 searchPath) at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags) at Sdcb.OpenVINO.Natives.NativeMethods.ov_get_openvino_version(ov_version* version) at Sdcb.OpenVINO.OVCore.get_Version() at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader..cctor() --- End of inner exception stack trace --- at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.Init() at Sdcb.OpenVINO.Natives.NativeMethods..cctor() --- End of inner exception stack trace --- at Sdcb.OpenVINO.Natives.NativeMethods.ov_core_create(ov_core** core) at Sdcb.OpenVINO.OVCore.CreateHandle() at Sdcb.OpenVINO.OVCore..ctor() at Sdcb.OpenVINO.OVCore.<>c.<.cctor>b__24_0() at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue() at Sdcb.OpenVINO.OVCore.get_Shared() at Sdcb.OpenVINO.DeviceOptions.DefaultCreateOVCore() at Sdcb.OpenVINO.BaseModel.CreateCompiledModel(DeviceOptions options, Action`1 afterReadModel, Action`2 prePostProcessing, Action`1 afterBuildModel, Action`1 afterCompiledModel) at Sdcb.OpenVINO.PaddleOCR.PaddleOcrRecognizer..ctor(RecognizationModel model, DeviceOptions deviceOptions, Nullable`1 staticShapeWidth) at (RecognizationModel, DeviceOptions, Nullable`1) at ???????????.???????????(RecognizationModel, DeviceOptions, Nullable`1) at WebAccountServer.Utils.OcrEngine..ctor(String publishDirectory) at (String) at ???????????.???????????(String) at WebAccountServer.Program.Init(Boolean isService, String[] args) at WebAccountServer.Program.Main(String[] args) at ???????????.???????????(TaskAwaiter&) at WebAccountServer.Program.<Main>(String[] args)
Unhandled exception. System.TypeInitializationException: The type initializer for 'Sdcb.OpenVINO.Natives.NativeMethods' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader' threw an exception.
---> System.DllNotFoundException: Unable to load native library: openvino_c.dll, dependencies status:
openvino.dll:0
at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.LoadWithDeps(Assembly assembly, Nullable1 searchPath, LibDeps[] libDeps) at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.OpenVINOImportResolver(String libraryName, Assembly assembly, Nullable
1 searchPath)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at Sdcb.OpenVINO.Natives.NativeMethods.ov_get_openvino_version(ov_version* version)
at Sdcb.OpenVINO.OVCore.get_Version()
at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader..cctor()
--- End of inner exception stack trace ---
at Sdcb.OpenVINO.Natives.OpenVINOLibraryLoader.Init()
at Sdcb.OpenVINO.Natives.NativeMethods..cctor()
--- End of inner exception stack trace ---
at Sdcb.OpenVINO.Natives.NativeMethods.ov_core_create(ov_core** core)
at Sdcb.OpenVINO.OVCore.CreateHandle()
at Sdcb.OpenVINO.OVCore..ctor()
at Sdcb.OpenVINO.OVCore.<>c.<.cctor>b__24_0()
at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy
1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy1.CreateValue() at Sdcb.OpenVINO.OVCore.get_Shared() at Sdcb.OpenVINO.DeviceOptions.DefaultCreateOVCore() at Sdcb.OpenVINO.BaseModel.CreateCompiledModel(DeviceOptions options, Action
1 afterReadModel, Action2 prePostProcessing, Action
1 afterBuildModel, Action1 afterCompiledModel) at Sdcb.OpenVINO.PaddleOCR.PaddleOcrRecognizer..ctor(RecognizationModel model, DeviceOptions deviceOptions, Nullable
1 staticShapeWidth)
Your PaddleSharp is running on Windows Server at the same time.
You can use Dependency Walker to inspect whether the dependencies of openvino_c.dll are normal.
Unfortunately, I am not a system engineer, it will be difficult for me to understand what the problem is and find a solution. That's why I wrote here. I spent all day yesterday trying to find the requirements for running VINO on Windows Server or known issues. I didn't find anything. The official website is empty. I only see that VINO should work on Windows Server in principle. I only need to use the CPU. I have enabled CPU usage. I ask you, as a pro in this matter, to help me understand what the problem may be. Thank you.
Thanks, I'll try.
Another question: if I will definitely use only the CPU, can I exclude unnecessary DLL files from the project?
Am I enabling CPU usage correctly?
var ocr = new PaddleOcrRecognizer(new FileRecognizationModel(ocrPath + "english", ocrPath + "en_dict.txt", ModelVersion.V3), new Sdcb.OpenVINO.DeviceOptions("CPU"));
Thanks.
Have you installed vcredist2015-2022 on your WS2016? https://aka.ms/vs/17/release/vc_redist.x64.exe
Yes, PaddleSharp is working on the same server
You can use Dependency Walker to inspect whether the dependencies of openvino_c.dll are normal.
Please help me understand what is missing.
Is there no latest version of VC Redist?
Is it possible to include the necessary versions of VC libraries in the project?
Thanks.
can you try again with https://github.com/lucasg/Dependencies
this one should works better, you can try inspect openvino.dll instead of openvino_c.dll
I found what the problem is, because of virtualization.
I set num_streams=1 and everything worked.