Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win server 2016 - failing to load library #258

Closed
pm4444 opened this issue Aug 9, 2023 · 1 comment
Closed

Win server 2016 - failing to load library #258

pm4444 opened this issue Aug 9, 2023 · 1 comment

Comments

@pm4444
Copy link

pm4444 commented Aug 9, 2023

On Windows Server 2016 I'm unable to load library.
It crashes during load of class before it even gets to code to create recorder.
Are there some known steps needed to take to make it run on Win Server 2016?

I tested same code (console app .net 4.6.2 built as x86 wrapping ScreenRecorderLib for 10s test video)
on Windows Server 2019 and 2022 and it works on both.
All Windows Servers are running as Hyper-V VMs and are new clean installations (updated).

On all 3 Windows Servers I installed Media foundation library and Visual C++ Redistributable x86 2015-2019.

I tried both x86 and x64 versions of library and both had same results.
For x64 I of course installed C++ x64 and built app as x64.
Tried to run it also with installed visual studio 2022, but it didn't make any change.

I tried dependency walker (older and also newer version), but frankly I'm not sure how to read results.
In visual studio with turned flag to show dll load errors it shown error during loading of NTDLL.dll
Dependency walker shows warnings for all visual c++ libraries, but it show same warnings on servers where application runs correctly.
Dependencies (newer dependency walker) shows error loading SysWOW64/kernel32.dll, but when trying to load that library separately it show no error.
As ScreenRecoredLib is not even loaded correctly there is no text log created.

In windows application log I get error
Faulting module name: KERNELBASE.dll, version: 10.0.14393.1770, time stamp: 0x59bf2bcf
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Exception code: 0xe0434352
Fault offset: 0x000daa12
Faulting process id: 0x2c8

sskodje added a commit that referenced this issue Aug 9, 2023
…able in Server 2016 and causing crash on DLL load.
@sskodje
Copy link
Owner

sskodje commented Aug 9, 2023

You were on the right track, it turned out to be a dependency error. Dependency walker is broken though. I had better luck with Dependencies. The problem turned out to be a function for setting thread descriptions not being available in Server 2016, sigh. I just removed it and it should work now.

@sskodje sskodje closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants