FFTW and VST errors

DSP, Plug-in and Host development discussion.
5 posts since 23 Oct, 2009

Post Mon Feb 15, 2010 7:03 am


Has anyone had trouble using FFTW 3 with VST ?
I'm linking everything properly for VST and FFTW
in VS 2008 and it builds it fine. Within the plugin
I've ended up not even doing anything on the input
with FFTW. I'm just declaring and allocating some
fftw_complex and fftw_plan variables.

The fftw declarations don't cause any errors,
but if I allocate some memory for them, it just
crashes the host..without any helpful message either..
just something like
"serious error, host needs to close"..

Again, the linking to the fftw3.lib is correct
and I include fftw3.h and the project compiles and
all goes as expected.
But it just crashes the host..

Also, I made a console app using fftw (with same prj settings)
and it works fine..! Strange stuff..

Anyone ever had this problem?


1893 posts since 28 Mar, 2005

Post Mon Feb 15, 2010 7:11 am

Don't want to sound rude, but you need to learn to use a debugger.
And see where it crashes, that's only way of knowing what s happening.
Olivier Tristan
Developer - UVI Team

User avatar
Zaphod (giancarlo)
2403 posts since 23 Jun, 2006

Post Mon Feb 15, 2010 7:12 am

no... fftw3 is running fine here... borland and vs.

1 posts since 1 Aug, 2016

Re: FFTW and VST errors

Post Mon Aug 01, 2016 12:12 pm

While this is an old post, I thought I'd reply with my solution in case anyone stumbles upon this as I did while hunting for solutions.

Try copying the FFTW .dll into the same folder as the vst .dll this fixed this same issue where it would compile fine but when it ran it wouldn't work

15 posts since 11 Nov, 2011

Re: FFTW and VST errors

Post Sat Jan 06, 2018 2:14 pm

I'll also bump this old post as I ended up here looking for something very similar. It was not adequate to place the fftw dll in the same directory as the vst but had to go in the directory of the host exe (in my case \Steinberg\VST3PluginTestHost).

However the planner functions in fftw use global variables and should be called from a single thread (http://www.fftw.org/fftw3_doc/Thread-safety.html). I do not think that there can be any guarantee of the host application to either provide separate address spaces or initialize each plugin in serial way. Maybe I am incorrect though? I did look at integrating fftw into my solution as the full source is available, but it became more work than I want.

For my app, I have instead opted to grab fft.h/fft.c from the WDL code base until I determine if fft performance is even something I need to be concerned with.

Return to “DSP and Plug-in Development”