obsproject / obs-vst

Use VST plugins in OBS
GNU General Public License v2.0
181 stars 56 forks source link

Blank VST GUI, crash on window closed, on Linux #66

Open michaelcadilhac opened 4 years ago

michaelcadilhac commented 4 years ago

Platform

OS: Arch Linux, up to date OBS Studio version: master (with OBS-VST at master; also checked with the revision linked in the OBS repo) Qt version: 5.15.0

Current Behavior

Steps to Reproduce

  1. Add a VST 2.x Plug-in on audio source
  2. Click on Open Plug-in Interface.

Additional info

DDRBoxman commented 4 years ago

Which plugins did you test this with?

I haven't tried arch but was successful at getting these two displaying on multiple ubuntu versions:

PTC-2A https://www.overtonedsp.co.uk/download/download_ptc_2a/

Rough Rider https://www.audiodamage.com/pages/free-downloads

michaelcadilhac commented 4 years ago
  1. I tried with the plugins that were on my distribution:
    • lsp-plugins
    • ambix (direct segfault!)
    • zam-plugins
    • dragonfly-reverb
    • ninjas2
    • ...
  2. PTC-2A does work!
  3. But there're still some crashes with window closing, even with PTC-2A. In particular, if the VST GUI window loses focus, the OBS-VST dialog turns "Close Plug-in interface" to "Open...". If I force close the VST GUI, then there's a segfault, so the only way to "cleanly" close it is to click on "Open Plug-in interface" then re-click on it now that it states "Close plug-in interface."
p0nce commented 3 years ago

Hello,

EDIT: I realized afterwareds that may not the same bug

We are making a pitch-correction plugin. A crash of OBS Studio at close was reported 5 times by our users.

To reproduce, you reload a session with one VST plugin (for example, Auburn Sounds Graillon v2.4 before the fix)

I've retraced the VST crash in our plugin to the following sequence of VST2.4 opcodes:

[9088] dispatcher effect 000001A18BAFB110 opcode 45  // this is over the entire course of the OBS program
[9088] dispatcher effect 000001A18BAFB110 opcode 47
[9088] dispatcher effect 000001A18BAFB110 opcode 10
[9088] dispatcher effect 000001A18BAFB110 opcode 11
[9088] dispatcher effect 000001A18BAFB110 opcode 12
[9088] dispatcher effect 000001A18BAFB110 opcode 15

tl;dr OBS Studio is calling effEditClose even when effEditOpen was never called. Not all plugins can deal with that.

More details here: https://github.com/AuburnSounds/Dplug/issues/491

As a lot of plugins will crash and OBS Studio is the only VST2.4 host I know that will produce that opcode sequence, I think it would be great for users to fix it in obs-vst (ie: not call effEditClose if effEditOpen wasn't called)

The partly blank window bug is annoying too with DPI != 100% on Windows :)

halirutan commented 2 years ago

@DDRBoxman The Rough-Rider plugin works for me as well. However, non of the plugins found in the package available on https://lsp-plug.in/ show up. There is no error message when opening the UI of the plugins. They just stay black.

I tested all these plugins with carla and they work as expected.

Would it be possible that you try these VST plugins on Linux?

I'm here on Ubuntu 20.04 with the latest official OBS version 27.2.4