Juce plugins in bridged mode (pvst)

River Cricket
Posts: 135
Joined: Sat Dec 20, 2014 6:53 am

Re: Juce plugins in bridged mode (pvst)

Post by River Cricket »

polac wrote:
Mon May 31, 2021 10:09 am
I've had this with Valhalla suite stuff and with Serum, which is a non-JUCE VST. So it's not JUCE-related, as far as I can tell, but it is plugin-specific - I think. I've never had the issue with Brainworx stuff, for instance, and to the best of my recollection it's never happened with Surge.
I cannot reproduce it with Serum here, songs are loading fine, but i'm doing not much songs lately. I have also some Valhalla stuff installed here to test.
It's very, very random. In my experience it happens... well, frequently enough to willingly end up with 40GB of copies of what is fundamentally the same 1.5GB file, but not quite frequently enough to really be a Buzz-kill (sorry, couldn't resist that one :P). I consider myself reasonably good at reproducing bugs, but reliably reproducing this one continues to elude me.

I do have some project files after the bug has triggered, not sure if there'd be anything terribly illuminating in them though - to all appearances, it's just as if there's a brand-new VST with the default patch. If you're interested, let me know and I'll try to find some.

I've tried disabling Load/Save in GUI Thread in the past, and as far as I can tell it has no effect - however, for some reason it seems like the Load/Save checkbox isn't "sticky" - regardless of whether or not I have "run in separate process" ticked, Load/Save always defaults to ticked in a new instance of Serum, and I definitely can't remember to always tick it when doing a new project. :P

(However, Async Load/Save in the CTRL-ALT bridge popup does remember whether I've checked it or not - this is the same as Load/Save in GUI Thread, just a different label, right?)

And I'm sad to hear about the lack of songs lately... hopefully that's just a temporary dry spell, all the work you put into making Buzz fun for others to make music in should come back to you tenfold.
polac wrote:
Mon May 31, 2021 10:11 am
Also are there problems with vst2 or vst3 plugins? Only test vst2 here.
For me, it's VST2 - I use VST2 whenever possible.

River Cricket
Posts: 135
Joined: Sat Dec 20, 2014 6:53 am

Re: Juce plugins in bridged mode (pvst)

Post by River Cricket »

Giving this a bump - I had the "good fortune" of having a project open where I knew the bug was being triggered (you can tell by looking at the file size of the BMX - if the file is suspiciously small, it's a good bet you're not getting your VST settings saved).

What I could discover:
  • It's not "random" - no matter how many times I save this project, it will never save the VST settings.
  • Separate process / Dedicated Process / Load/Save in GUI / Save Complete Bank (vs Save Program Only) / Save VST Params all have no effect whatsoever.
I think the issue is limited to 64-bit VST/VSTi's only. I also think I can now reliably reproduce the issue on my local machine, thanks to a particular project and a particular VST preset that, when loaded into this project, will fail to save properly. If polac or someone would like to hold my hand a bit and offer debugger guidance I'd be happy to do so!

I suspect the underlying issue is 64-bit VSTs doing something (trying to allocate large blocks of memory?) which causes the wrapper to fail in a manner where it silently recovers enough to keep functioning within the project, but with some component still too borked to properly send the current machine settings to the BMX creation process. I have no concrete proof for this, but given that the problem seems to only affect 64 bit VSTs, and given that the VSTs that most often trigger the bug for me are generally the more CPU-intensive ones, it seems logical.

polac
Posts: 369
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: Juce plugins in bridged mode (pvst)

Post by polac »

I think the issue is limited to 64-bit VST/VSTi's only. I also think I can now reliably reproduce the issue on my local machine, thanks to a particular project and a particular VST preset that, when loaded into this project, will fail to save properly. If polac or someone would like to hold my hand a bit and offer debugger guidance I'd be happy to do so!
So it's most likely a bridge problem, my bet it also happens with bridged 32bit plugins. If the bridge saves the bank/program to a song it splits the data into small pieces, perhaps there is a bug somewhere, I'll take a look.

Edit: I was able to reproduce the serum issue with a cpu-intensive patch. Sometimes it load/saves, sometimes not.

River Cricket
Posts: 135
Joined: Sat Dec 20, 2014 6:53 am

Re: Juce plugins in bridged mode (pvst)

Post by River Cricket »

polac wrote:
Tue Jun 29, 2021 10:08 am
I think the issue is limited to 64-bit VST/VSTi's only. I also think I can now reliably reproduce the issue on my local machine, thanks to a particular project and a particular VST preset that, when loaded into this project, will fail to save properly. If polac or someone would like to hold my hand a bit and offer debugger guidance I'd be happy to do so!
So it's most likely a bridge problem, my bet it also happens with bridged 32bit plugins. If the bridge saves the bank/program to a song it splits the data into small pieces, perhaps there is a bug somewhere, I'll take a look.

Edit: I was able to reproduce the serum issue with a cpu-intensive patch. Sometimes it load/saves, sometimes not.
:dance: :dance: :dance: Between this breakthrough and the workaround for JUCE popups, the next version of pVST is looking to be a real doddle! I'm daring to imagine a Buzzworld full of Embedded VST GUIs and with reliable saves... and it's beautiful...

polac
Posts: 369
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: Juce plugins in bridged mode (pvst)

Post by polac »

Happened only once here yet though. So it's still a hard to find bug. Also Serum does not require to split the bank data, interprocess memory is large enough for the bank as it seems. I also did some test with Voltage Modular as this is a HUGE cpu hog, but no problems to load here yet. And this one requires splitting, so this seems to work too.

Edit: Serum can have larger preset sizes too, but they did work too.
Last edited by polac on Tue Jun 29, 2021 2:50 pm, edited 1 time in total.

polac
Posts: 369
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: Juce plugins in bridged mode (pvst)

Post by polac »

I changed something with the loading of banks/programs, don't know if that helps with the problem(or breaks other things too). I'll do some testing. But my guess it must be something with the saving of projects, not loading, hmm.

polac
Posts: 369
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: Juce plugins in bridged mode (pvst)

Post by polac »

River Cricket, any specific Serum preset that always triggers the saving bug?

polac
Posts: 369
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: Juce plugins in bridged mode (pvst)

Post by polac »

I did add some synchronization between process thread and preset saving, perhaps this helps. Actually the plugin should do this if necessary.

River Cricket
Posts: 135
Joined: Sat Dec 20, 2014 6:53 am

Re: Juce plugins in bridged mode (pvst)

Post by River Cricket »

polac wrote:
Tue Jun 29, 2021 2:23 pm
I changed something with the loading of banks/programs, don't know if that helps with the problem(or breaks other things too). I'll do some testing. But my guess it must be something with the saving of projects, not loading, hmm.
Yes, definitely it occurs when saving. Affected files are generally smaller than they should be - as if the data is simply not being written to the .BMX at all.
polac wrote:
Tue Jun 29, 2021 2:35 pm
River Cricket, any specific Serum preset that always triggers the saving bug?
In my experience, no single preset will "always" trigger the bug - it's a project-level thing. Simple projects always save properly no matter what the preset, less-simple projects can suffer the glitch even on a pretty simple preset.

It's very rare to have a reliable fault with this - generally, once presets are manually re-loaded into the VSTs, the project will then save. However, you can imagine there's an invisible "breaking point" - once a project gets to a certain level of complexity, the odds a preset won't save increase, so often it becomes a bit like a dodgy old car - manually replace one preset, then a different machine breaks on the next save.

My advice is to keep adding Serum and Serum_FX instances, and saving each iteration as a new file - if/when the filesize suddenly drops, you'll know the bug has been triggered.

Post Reply