Automation broken with JUCE 5.4 when LEGACY_PARAM_IDS enabled

Hi Tom

I didn’t test enough. It looks like the VST3 version crashs when connecting the parameters with the latest develop:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ch.toguaudioline.talbassline101	0x0000000114411c0b juce::JuceVST3EditController::setupParameters() + 1323
1   ch.toguaudioline.talbassline101	0x000000011440e754 non-virtual thunk to juce::JuceVST3EditController::connect(Steinberg::Vst::IConnectionPoint*) + 148
2   com.cockos.reaper             	0x0000000100726fe8 VST_HostedPlugin::VST3_Init(int, char const*) + 3944
3   com.cockos.reaper             	0x000000010031ef8c VST_HostedPlugin::OpenFromUID(char const*, int, char const*) + 524
4   com.cockos.reaper             	0x00000001003481b3 FxDsp::FxDsp(int, char const*, void*) + 1859
5   com.cockos.reaper             	0x0000000100360701 FxChain::addSelection(HWND__*, bool, int) + 2257
6   com.cockos.reaper             	0x000000010038800d addDialogProc(HWND__*, unsigned int, unsigned long, long) + 14669
7   ???                           	0x0000000800000fa0 0 + 34359742368
8   ???                           	0x000000050000000a 0 + 21474836490

On windows and OSX.

1 Like
2 Likes

It works, thanks!

I’m on the 5.4.1 tag (master), also using JUCE_FORCE_USE_LEGACY_PARAM_IDS and JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE, and not using the new AudioProcessorParameter classes, but the plain old setParameter/… methods.

I’m not seeing this issue though: I can add and draw automation curves in Live 10 (AU and VST2) and Logic Pro X (AU) just fine.

I was planning to do a new release of my plugin soon, and wanted to check if some bugs might have been fixed on Develop that were not in Master yet and could be important for my plugin. And this issue with 2 fixes is one of them.

–> So, could someone explain what the 2 fixes (esp. the 1st one) actually fix, or how it can be that I’m not seeing problems with automation even though I’m also using the JUCE_FORCE_USE_LEGACY_PARAM_IDS flag? Thanks!

(I’m always hesitant to pull in commits from Develop (esp. if they haven’t been cherry-picked into Master) but this sounds like an important fix, so I’d like to understand what’s going on)

Hi, the chance is big that this happened only with the new AudioProcessorParameter classes. Automation was not possible at all for all plugin formats with legacy parameter automation enabled.

Well, I noticed the use of the LegacyAudioParametersWrapper class (in the VST, AU and AAX wrapper), and this uses the LegacyAudioParameter class, which is derived from AudioProcessorParameter. So, I thought everything said about the new AudioProcessorParameter classes also applies to my use case (indirectly). But I suppose the flags I’m using must force some other logic route to be used then.