Skip to content

Debug version of plugins crashes #261

@jiftoo

Description

@jiftoo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions