"First-chance exception.... cufftResult_t at memory location ...."

I am using the cuFFT library, and performing an operation very similar to the simpleFFT sample program. The first time I go through the loop, I get this error message:

First-chance exception at 0x7599c41f in myTestr.exe: Microsoft C++ exception: cufftResult_t at memory location 0x0038f114..

On subsequent loops there is no message. And the answers I am getting seem correct, but when I try to run the program outside the debugger it crashes.

Please help.

CORRECTION: it looks like my call to cufftPlan1d is the culprit. Here is my call:

checkCudaErrors(cufftPlan1d(&PC->fftPlan, PC->K, CUFFT_C2C, 1))

Any ideas?

I got same exception.
Cuda5.0 driver 314.22 with GTX580, GTX Titan VS2008 Windows7 x64 combination, using nVidia sample simpleCUFFT.

checkCudaErrors(cufftPlan1d(&plan, new_size, CUFFT_C2C, 1)); call generates exception. Uisng Cuda4.2 was OK. I guess cuda 5.0 bug?

I have the same bug with CUDA 5.5 RC.

I have compiled the system for 64-bit using Windows 7 and VS2012. My full error line is:

First-chance exception at 0x000007FEFE049E5D in unitTest.exe: Microsoft C++ exception: cufftResult_t at memory location 0x000000000018F3A0.


The smallest working example is this

#include <Windows.h>
#include <tchar.h>
#include <cuda_runtime.h>
#include <cufft.h>
#include <stdio.h>

int main(int argc, _TCHAR* argv[])
	cufftHandle plan;
	if( cufftPlan1d( &plan, 256, CUFFT_C2C, 1 ) != CUFFT_SUCCESS ){
		printf( "Plan creation failed\n" );
	printf( "Test done\n" );
        return 0;

I have the following includes:


And library folders are:

with the following libraries:

I have not checked the “CUDA 5.5 Build Rules”, but I have both CUDA 5.0 and 5.5RC installed. The CUDA_PATH is linked to the CUDA 5.5 RC.

Please note, I do not get an error-return.