docB padsynth crashes VCV VST

I’ve had a look at this and I think I know what’s going on.

The crash is due to a stack overflow when setting up the tables. You’re initialising a RealFFT with a length of 262144, which then causes the irfft() method to allocate 1MB of working space on the stack. That crashes because Bitwig’s plugin host only has a 1MB stack.

Standalone Rack has a 2MB stack, which is why you’re getting away with it there.

The correct fix is probably to provide pffft with a working space buffer, rather than leaving up to it to allocate the working space on the stack. The irfft() method doesn’t allow for that, but it’s only a one-liner that calls pffft_transform_ordered(). You could call that directly with a working space buffer that you manage yourself.

1 Like