Plugin failing to scan in Ableton on Windows

windows

#1

I’m trying to work out why a Windows plugin is failing to load.
It runs fine in the Plugin Host, and also passes all validation in pluginval.

All I get from Ableton is:

'Ableton Live 9 Standard.exe' (Win32): Loaded '\\Path-to\plugin.dll'. Symbols loaded.

'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file.

'Ableton Live 9 Standard.exe' (Win32): Unloaded '\\Path-to\plugin.dll'

Is there any way to get more meaningful hints?


#2

Did you check the Dependency Walker?
It works for checking dll’s too…

Although it’s probably a red herring, since it runs on plugin host. What is strange, why would it ask for the pdb… any debug versions involved?


#3

I am testing both Debug and Release versions. That particular output was from the Debug version. But the pdb files should be present as I’m pointing to the VST build output folder, unless it looks for them in the executable folder?

Thanks for the hint I’ll check out Dependency Walker.


#4

Seems to me the pdb should be alongside the dll, but then it shouldn’t be necessary to run, only if you want to see the symbols of your debug.
Maybe this implies, that the debugger was called because of an assert or something, but then stopped to debug, because the pdb was not found…?
Just guessing…


#5

Usually this turns out to be a 32/64 bit error when it happens to me :slight_smile:


#6

So, on a Release version (correct built type, Win32 in this case), the relevant output in Ableton:

'Ableton Live 9 Standard.exe' (Win32): Loaded '\\<Path-to>\Builds\VisualStudio2015\Win32\Release\VST\Paddle.dll'. Cannot find or open the PDB file.
'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\Windows\System32\winspool.drv'. Cannot find or open the PDB file.
'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.23894_none_5c0be957a009922e\GdiPlus.dll'. Cannot find or open the PDB file.
'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\Windows\System32\oleacc.dll'. Cannot find or open the PDB file.
'Ableton Live 9 Standard.exe' (Win32): Unloaded '\\<Path-to>\Builds\VisualStudio2015\Win32\Release\VST\Paddle.dll'
'Ableton Live 9 Standard.exe' (Win32): Unloaded 'C:\Windows\System32\oleacc.dll'
'Ableton Live 9 Standard.exe' (Win32): Unloaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.23894_none_5c0be957a009922e\GdiPlus.dll'
'Ableton Live 9 Standard.exe' (Win32): Unloaded 'C:\Windows\System32\winspool.drv'
'Ableton Live 9 Standard.exe' (Win32): Loaded '\\<Path-to>\Builds\VisualStudio2015\Win32\Release\VST\ MyPlugin.dll'. Symbols loaded.
'Ableton Live 9 Standard.exe' (Win32): Unloaded '\\<Path-to>\Builds\VisualStudio2015\Win32\Release\VST\MyPlugin.dll'

Paddle.dll is required for it to run. I wonder if its failing because its being “Unloaded” before the plugin dll? I wouldn’t think this would matter, as Paddle.dll is not a plugin, and should be being loaded by the plugin.


#7

Loading other dlls automatically (by including the dll import .lib file in your Visual Studio project) from a plugin is painful. You will probably get it working by copying the paddle.dll into the folder where Ableton Live.exe itself is located but that obviously isn’t going to be the proper solution.


#8

Aha, I’d wondered that, and yes, it does work if I copy Paddle.dll next to the Ableton executable. Damn, is there a way around this? I wonder why the Plugin Host loads it from the plugin location and Ableton from the executable location? Obviously Paddle has not been designed with plugins in mind… I’ll see if they can supply a static library.


#9

I guess this would involve copying the DLL to a common/system folder where Windows can find it if its not in the executable folder?


#10

Right, that will work too, but is not an ideal solution either. (What happens if some other application/plugin wants to use a “paddle.dll” from the system folders, which may be a different version or even a completely different library?)

The best is always if you manage to use a static build of the library built into the plugin itself. Second best is to manually load the dll from a path you control yourself and import the needed functions but it can get laborious.


#11

Second best is to manually load the dll from a path you control yourself and import the needed functions

Thanks for the tip.

This does look fiddly, but certainly doable. Found some examples here https://stackoverflow.com/questions/8696653/dynamically-load-a-function-from-a-dll


#12

You can use JUCE’s DynamicLibrary to make it a little less painful but it’s still going to be annoying because you need to declare the function pointers to the needed functions manually and do some nasty casts with the result of the getFunction method.


#13

We do this a lot… it works … if you get stuck let me know.


#14

Thanks guys much appreciated