Vienna Ensemble Pro 6: JUCE VST wrapper causes crash

An effect plug-in we’re making with JUCE 4.2.3 caused Vienna Ensemble to crash upon plug-in scan.
We’ve tracked it dow to line 1870 (I don’t have the slightest idea what lines 1869 through 1871 do):
if ((config[i] = (config[i] + 1) % maxChans[i]) > 0)

However changing it to
if ((config[i] = (maxChans[i])? (config[i] + 1) % maxChans[i] : 0) > 0)
seems to have fixed the issue but we’re absolutely unsure whether this may introduce new issues.

Are we probably doing something else wrong?

1 Like

At first glance those code snippets look like they’re doing the same thing, which is a bit worrying. Could you please explain your change?

You’re right, It is doing the same thing, we just changed it to avoid a divide by zero.

Your change should be fine.

There are much better multibus functions arriving very soon :slight_smile:

any reason not to push that fix to the dev branch meanwhile?

Pushed to develop.