Chowdhury-DSP / BYOD

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

[BUG] fl studio ui freezes whenever the plugin window is open #123

Closed ljleb closed 2 years ago

ljleb commented 2 years ago

Describe the bug When the plugin window is open (i.e. the plugin ui displays on screen), fl studio's ui freezes. Despite the ui not updating, it is still possible to interact with it (i.e. mouse events are intercepted properly). The ui of the plugin itself doesn't freeze, only fl studio's ui.

To Reproduce Steps to reproduce the behavior:

  1. make sure the channel rack is not in detached mode
  2. load the plugin into mixer track 1
  3. open the plugin ui by clicking on the associated entry in the mixer track effects
  4. click on the "View Channel Rack" button, or press f6
  5. notice how the channel rack doesn't seem to appear on screen
  6. close the BYOD instance's ui
  7. notice how fl's ui updates and the channel rack is now displayed as expected

Expected behavior I would expect fl's ui to not freeze when the plugin window is open. It should stay responsive

Screenshots In this image, my cursor hovers over the channel rack icon (in red) when the plugin ui is open. You can see that the icon does not light up as it should. image

In this image, my cursor hovers over the channel rack icon (in red) when the plugin ui is closed. You can see that the icon does light up. image

Desktop (please complete the following information):

I have no idea what can be causing this since I haven't really developed anything ui related... If you need any other info let me know.

jatinchowdhury18 commented 2 years ago

Thanks for reporting the issue! If the DAW UI is freezing or lagging when the plugin UI is open, I would recommend enabling OpenGL, or disabling some of the visualisations (see the plugin settings menu in the bottom right corner).

As I understand it, the root of the problem is that (when not using OpenGL), the plugin may try to render its graphics on the same thread as the DAW (this depends on the DAW), which may cause the renderring of either the DAW or the plugin to be laggy. When renderring with OpenGL, the plugin graphics will be renderred on a separate thread.

The reason that OpenGL is not switched on by default is that for some older computers that do not support the newer version of OpenGL, the plugin window will not render at all when using OpenGL.

Anyway, I'll try to add some of this explanation to the user manual to help out future users.

Thanks!

ljleb commented 2 years ago

@jatinchowdhury18 Thanks for the fast reply! Enabling opengl using the settings menu in the bottom right corner fixed the issue.