Deadlock when using multiple OpenGLRenderer components as children of a non openGL component

Hey @Alatar,

Basically what we’ve found is this:

  • macOS is usually okay, although other users on the forum have reported performance issues regarding multiple contexts in the same process. We haven’t experienced the issues yet, nor have we ever experienced OpenGLContext related crashes on macOS

  • Windows is often okay, although we encountered lots of performance issues when running multiple plugins. We got around this by disabling vsync, but that hasn’t worked for other people apparently. I have encountered at least one sort of issue where the host froze up, but it was actually running our juce::OpenGLContext plugin at the same time with one of our older plugins which manages its own context using pugl (on the main thread)

  • Linux (which most people don’t support anyway it seems?) is basically the wild west. I’ve encountered lots of really awful issues on Linux with NVIDIA drivers when using multiple instances of juce::OpenGLContext. Sometimes even just trying to run a single instance wasn’t working on certain Linux setups. The nouveau drivers have seemed most reliable when running single instances of the context… but of course that means you’ll probably run into trouble as soon as you open a second copy of the plugin.

These issues do not appear on hosts that support running plugin instances in their own dedicated processes… but not all hosts support that. It also doesn’t mean the context will work anyway, as I’ve had quite a lot of trouble trying to get any of our plugins running on the Linux version of Bitwig (with dedicated plugin processes enabled).

This thread discusses the issues people have encountered in more detail:

Worst case scenario is the user’s host will completely freeze or crash, and if it doesn’t they may just run into performance issues and see some ugly FPS drops.

2 Likes