Cubase 10 Windows Direct Offline Processing problem

#1

When I run one of our VST3 JUCE-based plugins in Cubase 10 on Windows, the Direct Offline Processing function has a problem, but I don’t know what causes it or if it’s a Cubase, JUCE VST3 wrapper or plugin problem. When it goes to Apply the changes (either via Auto-Apply being checked or by clicking Apply), it hangs, and I have to kill Cubase. Debugging, I see an exception being thrown when this code is executed:

        tresult PLUGIN_API setContentScaleFactor (Steinberg::IPlugViewContentScaleSupport::ScaleFactor factor) override
    {
       #if (JUCE_MAC || JUCE_IOS)
        ignoreUnused (factor);
       #else
        if (auto* editor = component->pluginEditor.get()) // EXCEPTION HERE
        {
            editor->setScaleFactor (factor);
            return kResultTrue;
        }
       #endif

        return kResultFalse;
    }

The problem seems to be that the “component” member is “empty”. There is no editor, in other words, but something is trying to set the scaling factor for the editor window. The call stack just says it comes from external code, so I guess the host is calling this?

Should this function have a fallback position of component is nullptr? Or is this a Cubase bug? Or…?

EDIT: we are using JUCE 5.3.2, by the way, in case this has been addressed already.

0 Likes

#2

This sounds like a bug in Cubase tbh.

0 Likes

#3

A simple check for component not being nullptr before calling its pluginEditor.get() resolves the problem. The question is, should I add that, or should I contact Steinberg/Yamaha to inquire after a fix for their Windows version of Cubase 10? It doesn’t happen in 9.5, or on the Mac. (It also doesn’t happen with a VST2 plugin, which makes me wonder if it’s the VST3 wrapper.)

0 Likes

#4

I think the fact Cubase is trying to set the scale factor when an editor doesn’t exist is a problem, if you can verify that the logic to make that call is coming from external code and not some weird behavior in the wrapper. They should probably get a bug report about it.

0 Likes

#5

Even if it’s a Cubase 10 PC bug, I see that other similar functions in the VST3 wrapper do check that component is non-null before accessing it, so I’m adding that in my wrapper code. This needs to be added in the VST3 wrapper in future versions.

0 Likes

#6

This was fixed quite a while back, it’s always worth checking the latest version before posting.

0 Likes

#7

Great, thanks. We’re stuck on 5.3.2 until we finish our current projects. Then we’ll move to the most current master. (Not my choice, but there it is.)

0 Likes

#8

This is the commit if you want to cherry-pick the fix:

1 Like