VST3 editors may assume a size larger than their containing window

This issue was originally reported on the JUCE Forum:

There’s a demo JUCE plugin you can test there.

Test environment

  • macOS 15.7.1
  • Cubase 14.0.40, Apple Silicon

Steps to reproduce

  • Build and install the demo plugin.
  • Create a new Cubase 14 project and add the plugin as an insert on a track.
  • Use the corner-resizer to resize the plugin editor so that it almost fills the height of the screen.
  • Click the “expand” button in the plugin UI.

Expected result

Cubase should display the editor without obscuring/clipping any edges. A simple approach would be to ensure that the top-level window is large enough to accommodate the new editor size. A more sophisticated approach might be to call checkSizeConstraint on the editor to see whether it can instead be sized so that the entire editor still fits on-screen.

Actual result

In a debugger, we see that the plugin calls plugFrame->resizeView() on the host, requesting an editor size that’s too large to fit on-screen. Cubase does not call checkSizeConstraint, but instead calls onSize on the plugin editor, passing the requested size. The plugin view resizes, but the Cubase top-level window does not, clipping the bottom edge of the plugin view.

The result might look like the attached screenshot, showing the bottom edge of the plugin editor. The plugin has asked to increase its editor height by 200 logical pixels, and those new pixels (a rect along the bottom edge of the editor with a height of 200) should be painted grey. We can see, based on the rounded corners of the window, that the host window is actually clipping the bottom of the editor. In a “real” project, this could mean that some plugin controls are no longer accessible.

I wasn’t quite sure whether to move the topic to the SDK or GUI section. Apparently I went for SDK.

It’s actually a Cubase bug not a bug in the SDK.
I’ve created an internal bug report.

2 Likes