Sushi fails to initialize plugins

Hi!
I’m quite new to DSP programming and really need some help to get Sushi to run properly.

I have 3 simple vst3 effect plugins that I’ve made and one of them works just fine, but the other two fail to load and I have no idea why… The config JSON files are identical with just different plugin names, UIDs and paths, so I feel like the problem lies somewhere in the plugin code, but all 3 have been made using stock JUCE modules.

I’m running Sushi on a Raspberry Pi 4 4GB with a HiFiBerry DAC + ADC Pro hat using Elk OS

Here’s the log info containing the errors:

[2022-09-17 16:32:29.528] [warning] #############################
[2022-09-17 16:32:29.528] [warning] Started Sushi Logger!
[2022-09-17 16:32:29.528] [warning] #############################
[2022-09-17 16:32:29.732] [info] [main] Setting up Xenomai RASPA frontend
[2022-09-17 16:32:29.741] [info] [jsonconfig] Setting engine sample rate to 48000.0
[2022-09-17 16:32:29.742] [info] [engine] Track main successfully added to engine
[2022-09-17 16:32:29.742] [info] [engine] Connected engine input 0 to channel 0 of track “0”
[2022-09-17 16:32:29.742] [info] [engine] Connected engine input 1 to channel 1 of track “0”
[2022-09-17 16:32:29.742] [info] [engine] Connected engine output 0 to channel 0 of track “0”
[2022-09-17 16:32:29.742] [info] [engine] Connected engine output 1 to channel 1 of track “0”
[2022-09-17 16:32:29.883] [info] [vst3] Querying plugin delayELK of type Audio Module Class
[2022-09-17 16:32:29.927] [info] [vst3] Creating plugin delayELK
[2022-09-17 16:32:29.927] [info] [vst3] Plugin supports Midi Mapping interface
[2022-09-17 16:32:29.927] [info] [vst3] Plugin supports Unit Info interface for programs
[2022-09-17 16:32:29.927] [info] [vst3] Plugin has 1 audio input buffers and 1 audio output buffers
[2022-09-17 16:32:29.928] [info] [vst3] Vst3 wrapper (delayELK) has 2 inputs and 2 outputs
[2022-09-17 16:32:29.928] [info] [vst3] Plugin has 0 event input buffers and 0 event output buffers
[2022-09-17 16:32:29.931] [warning] [vst3] Failed to get state from controller
[2022-09-17 16:32:29.931] [warning] [vst3] failed to sync controller
[2022-09-17 16:32:29.931] [info] [vst3] Vst3 wrapper (delayELK) setting up 2 inputs and 2 outputs
[2022-09-17 16:32:29.931] [error] [vst3] Failed to set a valid channel arrangement
[2022-09-17 16:32:29.931] [error] [engine] Failed to initialize processor delayELK with error 9
[2022-09-17 16:32:29.931] [info] [processor] Destroyed processor 1(delayELK)

I would really appreciate some help with resolving these problems

Cheers,
Max

Hi Max and welcome to the forums. Maybe you could try and run sushi with debug logging enabled and compare the logs from loading a working plugin (from what I understand some of your plugins do load correctly in sushi) and loading a non working plugin.

If I were to take a guess it does points towards something being of with the audio channel setup, the [error] [vst3] Failed to set a valid channel arrangement line. And error code 9 has to do with audio buses iirc. Maybe double check what audio bus and arrangements the plugin has?

Sushi does not support plugins with more complex bus routing, like sidechain compressors for instance, but in that case it should still load fine, the plugin would just use the main audio bus only.

I’ve had the same issue with a 0 input 2 output plugin. The layout seemed fine and worked as expected in Ableton Live. Compiling the same exact code into a VST2.4 plugin and using that with sushi worked. Same config file (other than tracks.plugins.path and tracks.plugin.type).

Hi, I’ve had just the same problem. A plugin with a simple channel setup (no side chaining etc.) working just fine in Logic and the juce AudioPluginHost. It also passes Pluginval on Linux. But when I try to run it in Sushi on the pi, I get the same errors as @MaksymMinajew. (To cross-compile I followed the guide: Build Plugins for Elk — Elk DevKit documentation)
I tried building a debug version as well and found out it’s hitting this assertion here in juce_VST3_Wrapper.cpp:

    tresult PLUGIN_API setBusArrangements (Vst::SpeakerArrangement* inputs, Steinberg::int32 numIns,
                                           Vst::SpeakerArrangement* outputs, Steinberg::int32 numOuts) override
    {
        if (active)
        {
            // The host is misbehaving! The plugin must be deactivated before setting new arrangements.
            jassertfalse;
            return kResultFalse;
        }

which suggests that Sushi is doing something wrong?
But this is when compiling the plugin with JUCE 7.0.3 and so I tried with JUCE 6.1.6 and that works just fine - in that version the setBusArrangements doesn’t have that check.
I saw in another post that a fresh image with the newest Sushi version is coming up, so maybe that will do it? Looking forward to getting that! :slight_smile:

1 Like

Thanks a lot for the debugging chrhaase, that’s a very interesting find. I will look into what sushi is doing here and if it does something in the wrong order.

1 Like

Great, thanks Gustav!

I dug into this a bit more, and indeed, sushi is in fact enabling the plugin before setting the channel configuration. I don’t have access to a plugin to that can reproduce the behaviour though.

If you’ve build sushi yourself, maybe you can give it a shot @chrhaase ? It’s a very easy change. On line 725 of src/engine/audio_engine.cpp sushi/audio_engine.cpp at master · elk-audio/sushi · GitHub just move the set_enabled(true) call to after the input/output channel config instead of before.

Again, thanks for reporting.

Sounds like that could be it. I’d love to give it a shot, but right now I’m just using the pre-built image (Release Elk Audio OS Image & Update 0.11.0 (RPi4) · elk-audio/elk-pi · GitHub). I’m not sure how much it would take to replace the Sushi version on that?

But hey, first I’ll just try building the elk-juce-example from GitHub - elk-audio/elk-examples: Example collection for Elk with the same JUCE version and see if that shows the same behaviour.

Ok, that example won’t build with JUCE 7, but it was pretty simple to get an example from the JUCE repo building (I just went with a simple gain plugin: JUCE/GainPluginDemo.h at master · juce-framework/JUCE · GitHub). And it fails in the same as my own plugins.

Maybe you can use that to reproduce it?

1 Like

Great. That sounds like it could work. Will give it a try when I have time.

1 Like

Hi ! I have the same issue with JUCE 7.0.5. Is there a fix coming for sushi ?

Cheers,
Val.

Hi Val and welcome to the forums. Yes, there will be a fix for this in the next release of sushi. We have no release date planned atm though. If you are able to rebuild sushi, you can apply the fix mentioned above.

Hi !
I’ll try this solution ! In the meantime, I downgraded to JUCE 6.1.6. and it works.

Thanks,
Val.

1 Like