falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.62k stars 147 forks source link

Win64 VST plugin window hangs at closing and mouse icon not visible except in pulldown menu #1367

Open zorro2055 opened 3 years ago

zorro2055 commented 3 years ago

Hello,

This might be an issue in Wine, but I thought I would post here first since one of the issues is not there in Carla 2.2, but is there in the develop branch.

First, the Win32 VST (Qin_RV.dll) works fine, no issues. Qin_RV_as_Plugin_In_Carla

For the Win64 VST, two issues are:

  1. In the develop branch pulled at 12 noon (CST) today (3/6/2021), the mouse icon is not visible except when over the activated pulldown menu (as shown below). This same issue exists in Carla 2.2. Qin_RV_x64_as_Plugin_In_Carla

  2. In the develop branch as per step 1, when the Qin_RV_x64 window is closed, it blanks the window and the window hangs. Eventually, the window closes and Wine provides a bracktrace. One thing I noticed. If I tried to close the window with the X in the upper right, then the mouse icon would not be visible in the hung window. If I tried to close the window with the gear symbol in CarIa, I could see the mouse icon in the hung window. I did not see this issue in Carla 2.2. Below are the blanked window screenshot, log file, and debug output file. Qin_RV_x64_As_Plugin_to_Carla_Tried_To_Close_Qin_Window _Using_Close_Window_Icon backtrace_Close_Qin_RV_x64_window_In_Carla.txt Carla_Debug_Log.txt

Lastly, this DLL is a paid VST plugin It is Erhu II (link). I am willing to do debugging if needed.

Let me know if there are any questions or if this bug should be reported to Wine.

Thanks!

falkTX commented 3 years ago

If you run it through a real win32/64 host in wine, do these issues still happen? something like reaper. If yes, then it is a wine or plugin bug.

zorro2055 commented 3 years ago

Thanks falkTX for the response.

Okay, I tested the Win32 and Win64 plugin in Reaper. The Win32 plugin was fine. The Win64 plugin showed the mouse icon at all times, but the Win64 plugin window hung when I tried to close that window. So mouse issue is Carla bug, and window hanging while closing is Wine or plugin bug? That is weird though. To verify that the Qin_RV_x64 plugin window closed without hanging in Carla 2.2.0, I just reinstalled Carla 2.2.0. That did work fine, the plugin window did not hang in Carla 2.2.0...

Anyway, let me know what you think. Supporting info is below.

Reaper with Win32 plugin (Qin_RV.dll) picture (no issue with this one): Reaper_w_Win32_Qin_RV

Reaper with Win64 plugin (Qin_RV_x64.dll) picture (no mouse issue): Reaper_w_Win64_Qin_RV

Reaper after trying to close Win64 plugin window (window hanging): Reaper_w_Win64_Qin_RV_Window_After_Trying_To_Close

Reaper after about a minute of window hanging from trying to close Win64 plugin window, this error pops up: Reaper_w_Win64_Qin_RV_Window_After_Trying_To_Close_Hanging_Then_Giving_This_Error

Debug log from closing Win64 plugin (Qin_RV_x64.dll) window (no issues) at least visibly: Carla-2.2.0_Debug_Log.txt

falkTX commented 3 years ago

I dont really know how to go about fixing this tbh. But something worth trying, in a terminal set the CARLA_DO_NOT_USE_JUCE_FOR_VST2 env var to any value and start carla from within that same terminal. See if this changes anything. To explain: usually carla lets JUCE take care of windows and macOS plugin handling, as there are too many quirks needed everywhere to get them all to work good. But JUCE itself also has its own issues. By setting that env var (assuming carla 2.3 binaries and bridges), carla will use its own native vst handling that is usually reserved to Linux hosting only.

zorro2055 commented 3 years ago

Got it. Okay, I entered the following commands at the command line (running Carla 2.3.0-RC1):

johnd@thor ~ $ CARLA_DO_NOT_USE_JUCE_FOR_VST2=1
johnd@thor ~ $ set | grep CARLA
CARLA_DO_NOT_USE_JUCE_FOR_VST2=1
johnd@thor ~ $ carla > Carla_Debug_No_JUCE.txt 2>%1

And here is the log file: Carla_Debug_No_JUCE.txt

Still the same mouse issue and window hang error. Is there a good way for me to verify that the no JUCE environmental variable worked properly? I didn't really notice a difference in the log files. Thanks.

zorro2055 commented 3 years ago

Ah, so running the command like this:

johnd@thor ~/Documents $ CARLA_DO_NOT_USE_JUCE_FOR_VST2=1 carla

solves the window hanging issue. The window closes now without hanging, and without giving a Wine error message. The mouse icon still disappears while in the window though...

zorro2055 commented 3 years ago

And investigating further, in the Wine configuration (Graphics), both the settings for allowing the window manager to decorate and allowing the window manager to control the window were checked. When I unchecked one of them, then the mouse icon is visible! I had to move the mouse in and out of the windows a couple of times though. No mouse would be seen at first, then the window would flicker black a couple of times. Then it was fine and I could see the mouse icon. This works the same way with and without the CARLA_DO_NOT_USE_JUCE_FOR_VST2 variable being set.

Below is a screenshot where one of these two options are checked and the mouse icon is visible in the Qin_RV_x64.dll window. I circled the two options where only one can be checked for me to see the mouse icon.

Qin_RV_as_Plugin_In_Carla_With_Changed_Wine_Settings

So, this basically solves my problem, but I am willing to try other things to properly get rid of this bug. If you think I should report this to Wine, then I'll do that.