[Solved] Issues with plugin loading

univrsal

Active Member
Hey,

I'm developing a plugin for obs-studio and I got a user that seems to have installed the *.dll files in the correct place, but the plugin isn't loaded properly (The new source isn't showing up as an option).
Here's the error message that confuses me:
Code:
09:56:40.727: LoadLibrary failed for '../../obs-plugins/64bit/input-overlay.dll': The specified module could not be found.
09:56:40.727:  (126)
09:56:40.727: Module '../../obs-plugins/64bit/input-overlay.dll' not found

Since obs is complaining about the input-overlay.dll I'd assume that the file is in the right place, yet it doesn't load the plugin. I have installed the same version on my machine and it runs without issues so I'm kinda clueless as to what the issue is.
Here's the entire log, and the github issue.
So if there's anybody that could give me a hint as to what that error message means I'd gladly appreciate it^^

Thanks in advance!
 

univrsal

Active Member
The user is probably missing the VC runtimes that your DLL requires.
Thanks for the quick response!
Sounds plausible, now on to finding out which one it is...

Edit: I compiled it with static linking and see if that helps
 
Last edited:

NLeseul

Member
You get the same result whenever any dependency is missing. VC runtime is probably a common culprit if you don't have any other dependencies, and if it only fails on some users. Static linking of the runtime is definitely a best practice with OBS plugins.

I usually use the Dependency Walker utility for checking the dependencies of DLLs when I'm trying to diagnose a problem like that.
 

univrsal

Active Member
You get the same result whenever any dependency is missing. VC runtime is probably a common culprit if you don't have any other dependencies, and if it only fails on some users. Static linking of the runtime is definitely a best practice with OBS plugins.

I usually use the Dependency Walker utility for checking the dependencies of DLLs when I'm trying to diagnose a problem like that.
Yeah I stumbled upon dependency walker when I looked up that issue, I only found VCRUNTIME140.DLL, and XINPUT1_4.DLL, so I'd guess it's the VC runtime that was missing since XInput should be present if directx is (I'd assume).

Edit: Well, the user is still experiencing the issue, so either I messed up the static linking or something else is the issue. Do I just give them an installer for VC runtime?
I configured Visual Studio to use /MT for my subproject in the obs-studio solution following this comment on stackoverflow.
Btw this is what dependency walker shows me:
tamisb.PNG
 

NLeseul

Member
Hmm. I believe both MSVC140.dll and VCRUNTIME140.dll are components of the VC runtime. Can you verify that both of those go away when you build your plugin with /MT?

If you're getting your plugin built with static linking correctly, XINPUT1_4.dll seems like the next most likely problem. It looks like that version of XInput is only standard on Windows 8 or later? From the log, your user seems to be running "Windows Version: 6.1 Build 7601," which corresponds to Windows 7 according to Google.
 

univrsal

Active Member
Hmm. I believe both MSVC140.dll and VCRUNTIME140.dll are components of the VC runtime. Can you verify that both of those go away when you build your plugin with /MT?

If you're getting your plugin built with static linking correctly, XINPUT1_4.dll seems like the next most likely problem. It looks like that version of XInput is only standard on Windows 8 or later? From the log, your user seems to be running "Windows Version: 6.1 Build 7601," which corresponds to Windows 7 according to Google.
Yeah, both DLLs are gone, the only one left is XINPUT, so I'd guess that's the one that's missing even after static linking.
I found some other people having that issue, who fixed it by replacing XInput.lib with XInput9_1_0.lib, so I'll try that.
Btw: thanks for helping me out^^
 

Suslik V

Active Member
The only method I know that user can beat, but only for 32bit version of the plugin/application - is to give him the VirtualDub. Then ask him to copy your plugin library input-overlay.dll file into the 'bin\32bit' folder of the OBS Studio. Then navigate in VirtualDub: menu Video>Filters...>Add...>Load... then select the All files(*.*) //this is the hardest part// - and then open this bin\32bit\input-overlay.dll that was copied. The user should say to you what first on screen error message says. Then user should remove the copied file from the 'bin\32bit' folder.
 

univrsal

Active Member
The only method I know that user can beat, but only for 32bit version of the plugin/application - is to give him the VirtualDub. Then ask him to copy your plugin library input-overlay.dll file into the 'bin\32bit' folder of the OBS Studio. Then navigate in VirtualDub: menu Video>Filters...>Add...>Load... then select the All files(*.*) //this is the hardest part// - and then open this bin\32bit\input-overlay.dll that was copied. The user should say to you what first on screen error message says. Then user should remove the copied file from the 'bin\32bit' folder.
Did this myself just now and I don't see how that would help. The error message doesn't contain any useful information, and even if it did it's localized in the windows system language meaning that I'd get an error message in Chinese from the user, which wouldn't really help me ,but thanks for the info nonetheless.
 

Suslik V

Active Member
But
...The specified module could not be found.
- clearly says that the whole module missing!
For example, remove(rename) the obs.dll from your bin folder and try the trick again for the frontend-tools.dll plugin.
 

univrsal

Active Member
But
...The specified module could not be found.
- clearly says that the whole module missing!
For example, remove(rename) the obs.dll from your bin folder and try the trick again for the frontend-tools.dll plugin.
I get the same error, what should I get out of that?
 

Suslik V

Active Member
I only want to say that it is very hard to know what is wrong with the user system (the number of ways it could be screwed is really huge). Either you writing your own full check for dependencies or use other application on user's PC that can load library, trigger and show the error that the some.dll is missing. OBS Studio itself designed to not rise any error messages.
 
Last edited:

univrsal

Active Member
I only want to say that it is very hard to know what is wrong with the user system (the number of ways it could be screwed is really huge). Either you writing your own full check for dependencies or use other application on user's PC that can load library, trigger and show the error that the some.dll is missing. OBS Studio itself designed to not rise any error messages.
Well, I only depend on Windows, OBS and DirectX so the amount of dependencies that could be missing can't be that high. I'll just wait for a response from the user for now
 

univrsal

Active Member
Update: Compiling it with XInput9_1_0.lib instead of XInput.lib fixed it together with static linking. Thanks for the help!
 
Top