cudaGraphicsGLRegisterBuffer crashes the app sometime ok and sometime ko

Hi,

error = cudaGraphicsGLRegisterBuffer(&_cuda_resources[0], _pbo, cudaGraphicsMapFlagsNone );

sometime works, sometime crashes without having the time to return any error, the call to the function itself makes the application crash.

What problem can make cudaGraphicsGLRegisterBuffer crashes?

It is like when things happen too fast, it crashes, what (and how) I should wait before calling it?

Thanks,

– pium & cuda3.2