Vienna Ensemble Pro 6: JUCE VST wrapper causes crash


#1

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?


#2

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?


#3

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


#4

Your change should be fine.

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


#5

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


#6

Pushed to develop.