robbert-vdh / yabridge

A modern and transparent way to use Windows VST2, VST3 and CLAP plugins on Linux
GNU General Public License v3.0
2.44k stars 63 forks source link

Neural DSP -Darkglass #98

Closed durutti closed 3 years ago

durutti commented 3 years ago

Hi again, I have an issue with Darkglass vst3. When inserted in track freezes mixbus7

What did you expect to happen? open gui

What actually happened? Mixbus7 froze

System information

Debug log tail -F /tmp/yabridge.log 01:05:09 [Darkglass Ultra-568Xcjsx] [host -> vst] >> 1: IConnectionPoint::connect(other = <IConnectionPoint proxy>) 01:05:09 [Darkglass Ultra-568Xcjsx] [Wine STDERR] [unknown interface] In IConnectionPoint::queryInterface(): {0x0101ABAB, 0xABCDEF01, 0x4E445350, 0x44524B55} 01:05:09 [Darkglass Ultra-568Xcjsx] [Wine STDERR] [query interface] In FUnknown::queryInterface(): {0x58E595CC, 0xDB2D4969, 0x8B6AAF8C, 0x36A664E5} 01:05:09 [Darkglass Ultra-568Xcjsx] [Wine STDERR] [query interface] In IHostApplication::createInstance(): {0x936F033B, 0xC6C047DB, 0xBB0882F8, 0x13C1E613} 01:05:09 [Darkglass Ultra-568Xcjsx] [vst -> host] >> 1: IConnectionPoint::notify(message = <IMessage 0x7f3ce8002d30 with ID = "JuceVST3EditController">) 01:05:09 [Darkglass Ultra-568Xcjsx] [host -> vst] >> 0: IConnectionPoint::notify(message = <IMessage* 0x7f3ce8002d30 with ID = "JuceVST3EditController">) 01:05:09 [Darkglass Ultra-568Xcjsx] [vst -> host] >> 1: IComponentHandler::restartComponent(flags = 12) 01:05:09 [Darkglass Ultra-568Xcjsx] [host -> vst] >> 0: IComponent::setActive(state = true) 01:05:09 [Darkglass Ultra-568Xcjsx] [vst -> host] >> 1: IComponentHandler::restartComponent(flags = 12) 01:05:09 [Darkglass Ultra-568Xcjsx] [host -> vst] >> 0: IComponent::setActive(state = true) 01:05:14 [Darkglass Ultra-568Xcjsx] [Wine STDERR] 02e8:err:ntdll:RtlpWaitForCriticalSection section 00000000005E1258 "?" wait timed out in thread 02e8, blocked by 02bc, retrying (60 sec) 01:06:19 [Darkglass Ultra-568Xcjsx] [Wine STDERR] 02e8:err:ntdll:RtlpWaitForCriticalSection section 00000000005E1258 "?" wait timed out in thread 02e8, blocked by 02bc, retrying (60 sec)

robbert-vdh commented 3 years ago

Can you try downgrading to Wine Staging 6.4? Someone on the Discord also mentioned that Darkglass doesn't work anymore with Wine 6.7. You may have to run wineserver -k immediately after downgrading to terminate any still running Wine processes.

durutti commented 3 years ago

Downgraded to 6.4. Similar results tail -F /tmp/yabridge.log

01:52:39 [Darkglass Ultra-0469DTVo] Initializing yabridge version 3.1.0 01:52:39 [Darkglass Ultra-0469DTVo] host: '/home/~/.local/share/yabridge/yabridge-host.exe' 01:52:39 [Darkglass Ultra-0469DTVo] plugin: '/home/~/.winePlugs/drive_c/Program Files/Common Files/VST3/Neural DSP/Darkglass Ultra.vst3' 01:52:39 [Darkglass Ultra-0469DTVo] plugin type: 'VST3' 01:52:39 [Darkglass Ultra-0469DTVo] realtime: 'yes' 01:52:39 [Darkglass Ultra-0469DTVo] sockets: '/run/user/1000/yabridge-Darkglass Ultra-0469DTVo' 01:52:39 [Darkglass Ultra-0469DTVo] wine prefix: '/home/~/.winePlugs ' 01:52:39 [Darkglass Ultra-0469DTVo] wine version: '6.4 (Staging)' 01:52:39 [Darkglass Ultra-0469DTVo] 01:52:39 [Darkglass Ultra-0469DTVo] config from: '' 01:52:39 [Darkglass Ultra-0469DTVo] hosting mode: 'individually, 64-bit' 01:52:39 [Darkglass Ultra-0469DTVo] other options: '' 01:52:39 [Darkglass Ultra-0469DTVo] 01:52:39 [Darkglass Ultra-0469DTVo] Enabled features: 01:52:39 [Darkglass Ultra-0469DTVo] - bitbridge support 01:52:39 [Darkglass Ultra-0469DTVo] - VST3 support 01:52:39 [Darkglass Ultra-0469DTVo] 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 002c:fixme:winediag:LdrInitializeThunk wine-staging 6.4 is a testing version containing experimental patches. 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org. 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:39 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0050:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0050:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 008c:err:module:open_builtin_file failed to load .so lib "/opt/wine-staging/lib64/wine/wineusb.sys.so" 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 008c:err:ntoskrnl:ZwLoadDriver failed to create driver L"\Registry\Machine\System\CurrentControlSet\Services\wineusb": c0000142 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 003c:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1114 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00cc:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00cc:err:module:open_builtin_file failed to load .so lib "/opt/wine-staging/lib64/wine/wineusb.sys.so" 01:52:40 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00cc:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@wineusb.sys,-1" -> L"C:\windows\inf\wineusb.inf" 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00f8:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 00f8:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0104:err:process:exec_process failed to load L"C:\windows\syswow64\rundll32.exe" error c0000018 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] wine: configuration in L"/home/~/.winePlugs" has been updated. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 010c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 010c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0114:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0114:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1. 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDOUT] Initializing yabridge host version 3.1.0 01:52:42 [Darkglass Ultra-0469DTVo] [Wine STDOUT] Preparing to load VST3 plugin at '/home/~/.winePlugs/drive_c/Program Files/Common Files/VST3/Neural DSP/Darkglass Ultra.vst3' 01:52:43 [Darkglass Ultra-0469DTVo] [Wine STDERR] 010c:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (000000000022EC70 1 C) semi-stub 01:52:43 [Darkglass Ultra-0469DTVo] [Wine STDOUT] Finished initializing '/home/~/.winePlugs/drive_c/Program Files/Common Files/VST3/Neural DSP/Darkglass Ultra.vst3' 01:52:48 [Darkglass Ultra-0469DTVo] [Wine STDERR] 0164:err:sync:RtlpWaitForCriticalSection section 0000000000D8EE18 "?" wait timed out in thread 0164, blocked by 013c, retrying (60 sec)

robbert-vdh commented 3 years ago

Hmm you're right. The plugin works great everywhere else, but not in Mixbus (and presumably also not in Ardour). I'll have to check what Mixbus is doing here.

robbert-vdh commented 3 years ago

The issue here is that Mixbus and the plugin get stuck in an infinite loop together. The plugin tells Mixbus that its parameter names and latency have changed. In response to that, Mixbus actives the plugin, after which the plugin tells Mixbus about its changed parameter names and latency again. And this cycle repeats once more until they both get stuck waiting on each other. In the Windows version of Mixbus this process kind of resolves itself, but because IComponent::setActive() is now called from two threads at once the plugin gets stuck waiting on itself. This should be fixed in Darkglass by not calling calling IComponentHandler::restartComponent() immediately after being activated. Working around this within yabridge is possible, but it would require a lot of ugly code just to work around Darkglass doing this so I'd rather not do that.

Did you try the VST2 version of the plugin? That does work properly in Mixbus. The next version of yabridge (and the current master branch version) should reduce the bridging overhead of VST2 plugins, so it will probably perform slightly better when the update is out.

EDIT: On second thought, I guess we will have to handle this, since this probably affects every JUCE plugin with latency in Ardour/Mixbus. This is going to be a fun one.

robbert-vdh commented 3 years ago

Okay, I could repurpose the hacky parts I talking about from another part of yabridge, and the VST3 version of Darkglass now works fine in both Ardour 6.6 and Mixbus 7.0.140 on my machine! I'll have to test this for regressions, but nothing seems to be broken so that's a good start :grin:.

If you want to give this fix a try, then you can download the latest build from the automated builds page. After replacing your existing yabridge files in ~/.local/share, you'll have to run yabridgectl sync to finish the upgrade.

durutti commented 3 years ago

Wow! Robbert this was fast. I downloaded the latest build and now it works Thank you

robbert-vdh commented 3 years ago

@durutti I've made another pretty big change in 0f506f75e4e60b8293b3b6534c44fd3214edf6e8 that should greatly improve VST3 plugin compatibility with Ardour and Mixbus. Those DAWs handle connecting VST3 objects differently from every other DAW, and trying to accommodate that approach has always proven difficult. In this commit we'll just try to bypass this so we can handle those plugins in the exact same was as we do in other hosts. Most notably this gets rid of a lot of edge cases where FabFilter VST3 plugins would freeze in Ardour and Mixbus. As a notable example, those plugins had a high chance of freezing if you tried to duplicate them while the GUI was open. This should now be fixed. Could you please try upgrading to the very latest master branch commit (from the automated builds page) to see if this also works well for you? Don't forget to re-run yabridgectl sync after replacing yabridge's files! :grin:

durutti commented 3 years ago

Hi @robbert-vdh Testing the latest build on a stereo track as I write 1) Apart from a black screen on Fabfilter proQ3 which went away after restarting mixbus7 no other major issues. Of course darkglass works fine

Minor issues on a couple of plugins 1) In fabfilter proq3 the headphones switch doesn't isolate the region as it usually does (on windows) 2) In Black Box analog design HG2 (plugin alliance) you cannot input values form keyboard something that can be done in FFProQ3 and darkglass. In addition when you double click on a controller it doesn't return to its original value. this behavior works in Analogs Obsession BrittChannel

Let me know if you think it should be better to open separate issues on these ones.

Best, durutti

robbert-vdh commented 3 years ago

Apart from a black screen on Fabfilter proQ3 which went away after restarting mixbus7 no other major issues. Of course darkglass works fine

Did you by any chance enable the editor_xembed option? I'm not getting any black screens on Pro-Q3 (or any other plugins) in Mixbus 7.0.140. One issue with plugins in Mixbus and Ardour though is that the editor widnow won't update correctly when a plugin resizes itself. I've talked a few times with Robin about this in the hope of figuring out if we have to do something special for Ardour (since it works just for VST2 plugins and it also works in every other host), but apparently it's not supposed to work. You can fix this that by resizing the actual window a bit.

In fabfilter proq3 the headphones switch doesn't isolate the region as it usually does (on windows)

Hmm you're right, good catch. I wonder what they're doing there. This works just fine in every other DAW. I'll have to take a closer look to see if I can figure this out.

In Black Box analog design HG2 (plugin alliance) you cannot input values form keyboard...

Maybe this is related to that keyboard button in the top right corner of Mixbus's editor window? I hear people talking about not being able to enter text in plugins in Ardour (and Mixbus) all the time, so maybe this is related. Have you tried these plugins in REAPER or Bitwig? Does text entry also not work there?

robbert-vdh commented 3 years ago

@durutti I figured out why the band solo in Pro-Q isn't working in Ardour/Mixbus. The plugin has a parameter that determines that a certain band should be soloed. When you click on that button, Pro-Q3 will send a parameter change for that parameter from the GUI thread to the host, and the host is then supposed to send that parameter to the audio processor. The issue is that Ardour and Mixbus don't do that, and the soloing thus doesn't work. I'll ask around in #ardour, but it may also be a good idea to send an email to Mixbus support about this.

(technically Pro-Q3 is also a bit off spec here, because it doesn't call IComponentHandler::beginEdit() before and IComponentHandler::endEdit() after the IComponentHandler::performEdit() call for this solo parameter)

durutti commented 3 years ago

@robbert-vdh If I remember correctly the band solo worked on previous mixbus versions (on windows). i will test it later on my windows machine and report back. Regarding the issue with editor window not updating correctly resizing the window shows all controls, so i can live with that. The keyboard icon does not change the gui behavior of Black Box analog design I dont work on reaper or bitwig so I cannot test it

Thanx

robbert-vdh commented 3 years ago

Yeah the EQ band solo in the VST3 version of Pro-Q3 in Ardour/Mixbus really seems to be broken at the moment. It also doesn't work with the Windows version of Mixbus 7.0.140 (running under Wine).

And for Black Box analog design, that's probably just an issue with Mixbus's keyboard grabbing. It will likely work fine in other hosts. I can add a yabridge.toml compatibility option later to forcefully grab keyboard input from the host (in a way where pressing space to start/stop playback no longer works), but that will have to wait a bit since I'm not finishing the release for yabridge 3.2.0!

durutti commented 3 years ago

You are right, EQ band solo in the VST3 version of Pro-Q3 in Mixbus really seems to be broken at the moment. (I checked it on my windows machine) The weird part is that VST2 works I will ask in the mixbus forum

robbert-vdh commented 3 years ago

With the VST2 version the plugin's GUI and audio processor are one unit so they can communicate directly, but with VST3 they are separate and the host is responsible for facilitating communication between those two parts. What happens with the VST3 version is that the plugin emits a parameter change from the GUI that the host is then supposed to deliver to the plugin's audio processor, but in the case of Mixbus and Ardour this doesn't happen. I've reported this on IRC and it seems like Robin has already identified this as a race condition in the VST3 hosting code, but posting about this on the Mixbus forum of course also doesn't hurt!

robbert-vdh commented 3 years ago

Yabridge 3.2.0 got a release, and this issue should now be fixed! Please let me know if it is not.