Urgent: VST 3.6.13 SDK (build 81) breaks binary compatibility

This change in falignpush.h cause hosts compiled with the new SDK to fail loading plug-ins compiled with previous versions of the SDK because it the binary layout is messed up, so that calls from the host end up in different functions in the plug-in:

#if SMTG_PLATFORM_64
#pragma pack(push, 16)
#else
#pragma pack(push, 1)
#endif

This can be reliably reproduced with Xcode 10.2.1 (10E1001) on MacOS 10.14.4 (18E226) - I have a simple test host and plug-in, and if both are build with the same SDK all is good, but if the host uses the latest SDK and the plug-in a previous one, the function pointers are off. This also happens with publicly released, actual plug-ins that use the previous SDK.

On a related note, the following lines cause a warning in Xcode:
#pragma GCC diagnostic default “-Wpragma-pack”
#pragma GCC diagnostic default “-Wunknown-warning-option”
both lines trigger: Pragma diagnostic expected ‘error’, ‘warning’, ‘ignored’, ‘fatal’, ‘push’, or ‘pop’

Hi,
I cannot reproduce this issue here. Can you be more specific which function pointers are off ?
I tried to reproduce this issue this way :
build validator from 3.6.13 SDK and build all plugin examples from the 3.6.12. All on macOS 10.14.4 with Xcode 10.2.1.
Running all plug-ins thru the validator works as expected.

Cheers,
Arne

Hi Arne,
I assume this may depend on some build setting, such as which MacOS SDK to use. I’ll try to strip my example to a minimum and email it to you directly.
The failing call from the host was factory->getFactoryInfo() (the first call to the factory after calling the entry proc), which in the plug-in ended up calling getClassInfo() with some messed-up class index, causing it to return kInvalidArgument. (If skipping the call to factory->getFactoryInfo(), it would crash later further inside the plug-in when dealing with the class IDs.)
Best,
Stefan

After offline discussion with Arne it turns out that SDK 13 actually fixes the alignment, it is broken in SDK 11 and 12, see:

Thus, upgrading to VST 3.6.13 SDK (build 81) is highly recommended :slight_smile:

Best,
Stefan

This is not correctly described. The issue was only once reproducable by Stefan on his machine when building an ARA plugin/host. Never again and not on another machine.
I suspect that a faulty build was the reason as no VST3 plug-in build with the previous SDK failed on any newer or older host. And we have code in the SDK that checks that these errors are not happening.

So don’t panic.

Cheers,
Arne

Actually this is not correctly described either. The crashes happened sporadically in different plug-in/host combinations across several weeks, I do have a bunch of crashlogs. But I indeed could only reliably reproduce the crash one day.
Anyway, since 13 actually restores something that 11 broke, I won’t bother searching further for the actual repro pattern.
And while the VST SDK does indeed check struct sizes, I don’t see where it would check struct alignment.
Best,
Stefan