takuya-takeuchi / FaceRecognitionDotNet

The world's simplest facial recognition api for .NET on Windows, MacOS and Linux
MIT License
1.27k stars 308 forks source link

System.DllNotFoundException: Unable to load DLL 'DlibDotNetNative': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) #131

Closed BioEnableDesktopTeam-Github closed 3 years ago

BioEnableDesktopTeam-Github commented 4 years ago

2020-08-26 18:11:43.163 Error Error in Main Method - System.DllNotFoundException: Unable to load DLL 'DlibDotNetNative': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) at DlibDotNet.NativeMethods.get_frontal_face_detector() at FaceRecognitionDotNet.FaceRecognition..ctor(String directory) at FaceRecognitionDotNet.FaceRecognition.Create(String directory) at Camera_Capture_ConsoleApplication.Program.Main(String[] args) in C:\Users.....\Documents\Visual Studio 2005\Projects\Camera_Capture_ConsoleApplication\Camera_Capture_ConsoleApplication\Program.cs:line 3139 2020-08-26 18:11:43.166 Error Error in Main Method - Unable to load DLL 'DlibDotNetNative': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)

at line : fr = FaceRecognition.Create("C:\WFH_Client\models");

working on some machines and not on some machine

machine config : windows 10 pro 64 bit

takuya-takeuchi commented 4 years ago

@vikrant-bioenable Could you check this issue? https://github.com/takuya-takeuchi/DlibDotNet/issues/153

BioEnableDesktopTeam-Github commented 4 years ago

my cpu is intel i5 7th generation...... it works on some machine perfectly...but on some machine showing above error... i had installed VC_redist.x64.exe also. file version - 14.26.28720.3...... after installing works on some machine ...but NOT on all

takuya-takeuchi commented 4 years ago

@vikrant-bioenable

C:\Users.....\Documents\Visual Studio 2005

Are you kidding? Do you use VS 2005? I doubt your machine does not have VC++ 2017 runtime.

BioEnableDesktopTeam-Github commented 4 years ago

I have installed VC++ 2015-2019 runtime... please see attached image Capture

takuya-takeuchi commented 4 years ago

@vikrant-bioenable I have a few time to check issue. Could you give the minimum sample project reproduce issue?

BioEnableDesktopTeam-Github commented 4 years ago

Hello sir , please find my source code build in Visual Studio 2019 - having above mentioned issue at below line -

fr = FaceRecognition.Create(AppRootPath + "\models");

GITHUB LINK - https://github.com/vikrant-bioenable/DemoProjectFacerecognition.git

BioEnableDesktopTeam-Github commented 4 years ago

Dear Sir.., Please update.. I am stucked here...

takuya-takeuchi commented 4 years ago

sorry, I lost your message. let me check again. thanks

takuya-takeuchi commented 4 years ago

image

  1. Open solution file by VS2019
  2. Debug by F5
  3. Stop on the above break point

And created Hyper-V machine, install only VS2019. After this, did the avobe steps again. But there is no issue.

image

I can not reproduce your issue.

BioEnableDesktopTeam-Github commented 4 years ago

Dear Sir, On my machine also it works very fine.... but on client machine this code fails at fr = FaceRecognition.Create(AppRootPath + "\models");

Clients machine configuration is : Windows 10 pro 64 bit machine

Please Help me out of this issue... I also Installed vc++ redist 2015-2019 on client machine and also installed .net core 3.1 runtime...

still above issue occurs

popy2k14 commented 3 years ago

Just for reference, has the same issue and was solved by using an older build for cpus without AVX instruction set. See here: https://github.com/takuya-takeuchi/DlibDotNet/issues/153#issuecomment-553400395

lequangtuananh93 commented 2 years ago

Maybe the reason is need to install old Net Framework version like 2.0, 3.0, 3.5,....it's worked for me :D