Run8stud
Topic Author
Posts: 15
Joined: 15 Jun 2018, 21:06

Noesis DLL (C#)

29 Oct 2021, 00:54

FATAL - System.DllNotFoundException: Unable to load DLL 'Noesis': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Noesis.Log.Noesis_RegisterLogCallback(NativeLogCallback callback)

Two of my beta-testers have run into this problem when our program starts up; one of them succeeded by setting a security rule in Windows to allow the Noesis DLL, the other had no such luck. We're using Noesis in a 64-bit C# application, DirectX-11. Both guys are using Windows 10. The location of the DLL is not the problem, it's right where it should be; rather, something is causing the system to not allow the DLL to be called. I'm at a complete loss as to why. Any ideas? For myself and all my other beta testers, everything works perfectly, and we're all using the same Windows 10 64-bit and DX11.

Here's the code leading up to it, (this code executes very early in startup):
var NoesisLogCallback = new Noesis.LogCallback(NoesisLogger);
Noesis.Log.SetLogCallback(NoesisLogCallback); //crash happens here

Thanks in advance!
 
User avatar
jsantos
Site Admin
Posts: 3919
Joined: 20 Jan 2012, 17:18
Contact:

Re: Noesis DLL (C#)

29 Oct 2021, 11:31

one of them succeeded by setting a security rule in Windows to allow the Noesis DLL
Do you know what security rule they enabled?
Here's the code leading up to it, (this code executes very early in startup):
var NoesisLogCallback = new Noesis.LogCallback(NoesisLogger);
Noesis.Log.SetLogCallback(NoesisLogCallback); //crash happens here
So if you remove SetLogCallback everything works?
 
Run8stud
Topic Author
Posts: 15
Joined: 15 Jun 2018, 21:06

Re: Noesis DLL (C#)

03 Nov 2021, 22:21

Sorry for my delay in responding... I will find out which rule he set and post it for you. As for removing SetLogCallback, I'll have to recompile it and have the guy try it out. It seems to be whichever happens to be the first call to the DLL, so I don't think it's specifically SetCallback().
 
Run8stud
Topic Author
Posts: 15
Joined: 15 Jun 2018, 21:06

Re: Noesis DLL (C#)

03 Nov 2021, 22:39

I commented-out SetCallBack(), and the crash simply moved to Noesis.GUI.Init() with the same results, can't call the DLL:
System.DllNotFoundException: Unable to load DLL 'Noesis': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Other info:
- C# using Visual Studio 2017
- compiled for Release, 64bit
- Dot Net 4.8
 
User avatar
sfernandez
Site Admin
Posts: 2995
Joined: 22 Dec 2011, 19:20

Re: Noesis DLL (C#)

04 Nov 2021, 11:08

Maybe your tester can turn on "loader snaps" as explained here: https://abitofscotland.wordpress.com/20 ... d-failure/
gflags /i <executable> +sls
And launch the executable from Visual Studio to get in the debugger Output window a detailed info on what happened when trying to load Noesis library.
1dc4:233c @ 02095296 - LdrLoadDll - ENTER: DLL name: W:\Test\Noesis
1dc4:233c @ 02095296 - LdrpLoadDllInternal - ENTER: DLL name: W:\Test\Noesis.DLL
1dc4:233c @ 02095296 - LdrpResolveDllName - ENTER: DLL name: W:\Test\Noesis.DLL
1dc4:233c @ 02095296 - LdrpResolveDllName - RETURN: Status: 0xc0000135
1dc4:233c @ 02095296 - LdrpProcessWork - ERROR: Unable to load DLL: "W:\Test\Noesis.DLL", Parent Module: "(null)", Status: 0xc0000135
1dc4:233c @ 02095296 - LdrpLoadDllInternal - RETURN: Status: 0xc0000135
1dc4:233c @ 02095296 - LdrLoadDll - RETURN: Status: 0xc0000135
1dc4:233c @ 02095296 - LdrLoadDll - ENTER: DLL name: Noesis
1dc4:233c @ 02095296 - LdrpLoadDllInternal - ENTER: DLL name: Noesis.DLL
1dc4:233c @ 02095296 - LdrpFindKnownDll - ENTER: DLL name: Noesis.DLL
1dc4:233c @ 02095296 - LdrpFindKnownDll - RETURN: Status: 0xc0000135
1dc4:233c @ 02095296 - LdrpSearchPath - ENTER: DLL name: Noesis.DLL
1dc4:233c @ 02095296 - LdrpComputeLazyDllPath - INFO: DLL search path computed: ...
...
 
Run8stud
Topic Author
Posts: 15
Joined: 15 Jun 2018, 21:06

Re: Noesis DLL (C#)

04 Nov 2021, 17:21

Small mistake: it's Noesis.GUI.dll, not Noesis.dll; the successful tester had to set an Exclusion in Windows Defender for Noesis.GUI.dll and then he was able to run everything just fine. The unsuccessful tester is likely setting the wrong exclusion and I'll probably know later today if he succeeds or not.
 
Run8stud
Topic Author
Posts: 15
Joined: 15 Jun 2018, 21:06

Re: Noesis DLL (C#)

04 Nov 2021, 23:38

Ok, we found the problem; somehow, this one particular guy needed to download and install "VC_redist.x64.exe" from Microsoft and that solved his problem. All of my other testers must somehow already have those dependencies as part of their system. So we're good.
 
User avatar
sfernandez
Site Admin
Posts: 2995
Joined: 22 Dec 2011, 19:20

Re: Noesis DLL (C#)

05 Nov 2021, 10:30

Great to hear that. Thanks for the update, I'm marking this topic as solved.

Who is online

Users browsing this forum: No registered users and 15 guests