Loading PVST dll
Loading PVST dll
i'm trying to load the PVST dll in my buzz machine loader, so far everything works ok, but two things don't work:
pLI->GetInstrumentList() doesn't seem to return anything, this is strange as buzé seems to be able to get a list of instruments, but i never get the Write() callbacks in CMachineDataOutput
when i bring up the "Open" dialog and choose a VST, it doesn't look like pvst is loading it
Command(0) brings up the file open dialog as expected
Command(3) or DoubleClickMachine should then show the GUI i think, but it just brings up the "Open" dialog again, as the vst was never loaded.
any ideas ?
pLI->GetInstrumentList() doesn't seem to return anything, this is strange as buzé seems to be able to get a list of instruments, but i never get the Write() callbacks in CMachineDataOutput
when i bring up the "Open" dialog and choose a VST, it doesn't look like pvst is loading it
Command(0) brings up the file open dialog as expected
Command(3) or DoubleClickMachine should then show the GUI i think, but it just brings up the "Open" dialog again, as the vst was never loaded.
any ideas ?
Re: Loading PVST dll
nevermind, the problem solved itself by updating to the latest PVST!
EDIT: the real problem seems to have been that i can't just load machines.dll and Polac VSTi 1.1.dll from my normal buzz folder, but have to place the whole contents of the zip file into my DEBUG / RELEASE folder... quite obviously...
EDIT: the real problem seems to have been that i can't just load machines.dll and Polac VSTi 1.1.dll from my normal buzz folder, but have to place the whole contents of the zip file into my DEBUG / RELEASE folder... quite obviously...
Re: Loading PVST dll
Without the machines.dll you cannot load the vst in pvst, it scans the vst at first, the open dialog will fail then.when i bring up the "Open" dialog and choose a VST, it doesn't look like pvst is loading it
Re: Loading PVST dll
thanks for your reply!
i got it to work, but now i have another small problem:
mi->Init(nullptr);
mi_ex->SetInstrument("mda Piano");
delete mi;
this sequence leads to a 4 byte memory leak.
mi->Init(nullptr);
//mi_ex->SetInstrument("mda Piano");
delete mi;
this does not leak.
(btw, happens with other VST too, so i think it's something to do with the loader?)
am i supposed to do something before calling the mi destructor ?
using v1.1.10b33
i got it to work, but now i have another small problem:
mi->Init(nullptr);
mi_ex->SetInstrument("mda Piano");
delete mi;
this sequence leads to a 4 byte memory leak.
mi->Init(nullptr);
//mi_ex->SetInstrument("mda Piano");
delete mi;
this does not leak.
(btw, happens with other VST too, so i think it's something to do with the loader?)
am i supposed to do something before calling the mi destructor ?
using v1.1.10b33
Re: Loading PVST dll
I think the mda piano(or was it the epiano) was a little bit buggy on closing the vst, but you say it also happens with other plugins, odd. Hard to say where the leaking comes from as i do lots of things in SetInstrument/destructor. I would say 4 bytes is not much but...
Re: Loading PVST dll
No it should work this way.am i supposed to do something before calling the mi destructor ?
Re: Loading PVST dll
i use this to find leaks, it served me very well:
https://docs.microsoft.com/en-us/visual ... ew=vs-2019
basically if you load 1 plugin: 4 bytes leak, if you load 2 plugins: 8 bytes leak and so on, so yeah it's probably something allocated after SetInstrument() that does not get free'd in the destructor.
https://docs.microsoft.com/en-us/visual ... ew=vs-2019
basically if you load 1 plugin: 4 bytes leak, if you load 2 plugins: 8 bytes leak and so on, so yeah it's probably something allocated after SetInstrument() that does not get free'd in the destructor.
Re: Loading PVST dll
Ok I'll take a look.
Re: Loading PVST dll
Doesn't help me as it seems, it shows a ton of memory leaks, even if i call _CrtDumpMemoryLeaks() in the constructor. Also i defined _CRTDBG_MAP_ALLOC, it should show up filename and line number of the memory leak but it doesn't.
Re: Loading PVST dll
Also I cannot find a memory leak with the size of exactly 4 bytes.
Re: Loading PVST dll
So I suppose all the leaks without the filename and line are from Buzz, not from the loaders.
Re: Loading PVST dll
it's easier to test in a .exe, i will try to make a minimal repro .exe to send you.
this is just a wild guess, but 4 bytes sounds like a pointer (testing this in a 32bit exe), and since it only occurs when loading a vst dll, maybe it is a missing freelibrary matching the loadlibrary ? or missing a closehandle somewhere? i also don't get a line number, so it must be somewhere in external code i think (at least somewhere where i don't have a pdb).
this is just a wild guess, but 4 bytes sounds like a pointer (testing this in a 32bit exe), and since it only occurs when loading a vst dll, maybe it is a missing freelibrary matching the loadlibrary ? or missing a closehandle somewhere? i also don't get a line number, so it must be somewhere in external code i think (at least somewhere where i don't have a pdb).
Re: Loading PVST dll
OK, this looks like it's something on my end, i copied the exact same code into a new project (to make a minimal repro), but then just compiled and it doesn't leak! So it must be something with my project / compiler settings, sorry to bother you
Re: Loading PVST dll
That's odd.