It appears that unless a plugin is compiled in release mode, both the VST3 and CLAP versions behave poorly.
I compiled two plugins from source to test this further:
- Spectral compressor would overflow its stack and crash.
- A dummy plugin with no parameters and an empty processing loop launches fine as CLAP, but panics as VST3 with the error below.
Program crashed: panicked at C:\Users\User\.cargo\git\checkouts\nih-plug-d4210f82e920295f\28b149e\src\wrapper\vst3\wrapper.rs:41:1:
misaligned pointer dereference: address must be a multiple of 0x8 but is 0x1969c304
A stack overflow isn't uncommon in debug mode, but a misaligned pointer read sounds like undefined behaviour being optimised away.
I think it's worth to at least warn users to expect errors, unless compiling in release mode.
It appears that unless a plugin is compiled in release mode, both the VST3 and CLAP versions behave poorly.
I compiled two plugins from source to test this further:
A stack overflow isn't uncommon in debug mode, but a misaligned pointer read sounds like undefined behaviour being optimised away.
I think it's worth to at least warn users to expect errors, unless compiling in release mode.