Chowdhury-DSP / BYOD

Build-your-own guitar distortion!
GNU General Public License v3.0
423 stars 22 forks source link

[BUG] VST2 crashes Reaper and VST3 without OpenGL freezes Reaper GUI temporarily #80

Open Tagirijus opened 2 years ago

Tagirijus commented 2 years ago

Describe the bug When using the VST2 version, it crashes Reaper immediately. The VST3 is loadable. Though this version hangs / freezes the Reaper GUI completely, as long as the plugin GUI is open. If it gets closed, Reaper is responsive again (only GUI gets frozen; sound continues to play).

To Reproduce Steps to reproduce the behavior: VST2 issue:

  1. Try to load VST2 into Reaper.

VST3 issue:

  1. Load VST3 into any track
  2. Play back Reaper while BYOD GUI is open
  3. Reaper GUI is not responsive anymore, as long as the BYOD GUI has focus

Expected behavior I expected the VST2 not to crash or give at least any kind of error message.

I expect the VST3 to not freeze the Reaper GUI.

Screenshots Reaper GUI freeze

Desktop:

"Copy Diagnostic Info":

Version: BYOD 0.2.0
Commit: a125f33 on HEAD with JUCE version JUCE v6.1.4
Build: 1 Feb 2022 0:33 on fv-az211-197 with MSVC-19.29.30139.0
System: Windows (Desktop) with Windows 10 (64-bit) on 16 Core, Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Plugin Info: VST3 running in Reaper running at 44.1 kHz with block size: 256

Hope this helps! (=

jatinchowdhury18 commented 2 years ago

Thanks for the report!

The crashing VST2 should now be fixed as of the latest commit.

The VST3 graphics issue is a little bit more subtle. The real issue here, is that the default JUCE Graphics engine uses the JUCE "message thread" for rendering the plugin UI. In some hosts (including Reaper), the message thread is also used for renderring the DAWs UI, which is why the Reaper GUI is becoming non-responsive as you noticed. Using the OpenGL renderring engine runs on a separate thread, which is why the issue does not occur there. Unfortunately, on some older computers, the OpenGL renderring runs so slow that the plugin becomes essentially unusable, which is why that option currently defaults to off. So for the moment , I think the options are either to write a new renderring engine (which I don't really have the time of knowledge to do), or let users turn on OpenGL if it works well on their system. Definitely open to other ideas as well!

Tagirijus commented 2 years ago

Hi there! Thanks for the feedback and for fixing the VST2 thing. Also thanks for explaining. Maybe someone else more skilled than me in this kind of area will come up with ideas, hehe. Keep up the great work you do. (=

If I can be of help in any way, just let me know (e.g. testing something else or so regarding this issue here).

jatinchowdhury18 commented 2 years ago

No problem!

Testing is always a massive help, especially on DAWs that I don't use super often (like Reaper on Windows). There's naturally still going to be a lot of bugs at this stage. but catching them early is always best!

Thanks, Jatin

X-Raym commented 1 year ago

Hi @jatinchowdhury18 Just to mention the issue is still there, tested with last repaer version and last BYOD version, so the ticket need to be reopen. Some REAPER UI element freeze when this plugin has openGL activated.

Windows x64. Confirmed by another user.

Thx!

jatinchowdhury18 commented 1 year ago

Thanks for the report! We're actually working on this issue at the moment. Maybe after we merge #201 we can try testing again with the nightly builds.

jatinchowdhury18 commented 1 year ago

So we've merged a bunch of UI optimizations which should help with the GUI freezing issue. I did some testing yesterday in Reaper on Windows x64, and didn't have any issues with the Reaper UI freezing, both with OpenGL on and off. If you're able to try out the latest Nightly Build for confirmation, that would be fantastic!

DomMcsweeney commented 1 year ago

Hey I tested the latest nightly VST3 version, it seems pretty good on windows 11 in latest release of Reaper, thank you. I have noticed that the cursor turns into a blue loading circle wheel thing...at least sometimes..... (when opting for OpenGL or bypassing it) but that stops as soon as you move the cursor away from the plugin. (Does yellow indicate that open GL is active or not?)

jatinchowdhury18 commented 1 year ago

Awesome, thanks for the update! Yes, in the settings menu, yellow text indicates that an option is turned on. I'm not 100%. sure if I can do anything about the loading circle when switching OpenGL on/off (that might be something going on at a lower level than I have access to), but I'll certainly give it a look.

Tagirijus commented 1 year ago

Finally I got some time to test it as well. So far no issues. Windows 10 64 bit here, Reaper v6.68 - VST2 and VST3 work fine with either OpenGL activated or disabled. Hope this helps. (=