_rtContextLaunch2D caught exception

Hello,
I am deploying my optix app to a final user. Only in his computer (windows 10 64bits) i am getting this error

Optix Error ‘Unknow error (Details: “_rtContextLaunch2D” caught exception: Encountered a CUDA error: driver().cuMemcpyDtoHAsync( dstHost , scrDevice, byteCount, hStream.get()) returned (700): Illegal addres)’

i guess in this line:
context->launch( 0, width, height);

In my computer the app works fine. Also i included 2 samples from optix SDK in the build files, and both of them works fine in the customer computer (optixHello.exe and optixWhitted.exe) so I think it´s not a driver, library, dll or another installation problem. It has to be related only to my app, but i cann´t reproduce the error in my computer.

Any suggestion?
Thanks in advance!

Mariano Banquiero.

Have you tried enabling all OptiX exceptions locally and installing an exception handler? That’s probably the easiest thing to try first. It would catch an out-of-bounds buffer access or similar, which could cause the behavior you’re seeing.

The fact that SDK samples run on the target GPU is a good smoke test.

You might also want to verify that the target GPU has enough memory, although this doesn’t look like an out-of-memory problem to me at first glance. You can measure memory usage on your local GPU using nvidia-smi in a Windows/Cygwin shell, or other tools.

Btw, that error about cuMemcpyDtoHAsync is generic and just means the launch failed. At the end of the launch we read back some status info from device to host, which is an illegal read if the kernel is no longer running.

Hello,
le me see if i got the idea, you mean something like this in the .cpp program

rtContextSetExceptionEnabled(context,RT_EXCEPTION_ALL, 1);

and then write a handler in the .cu program, like this :

RT_PROGRAM void exception()
{
output_buffer[launch_index] = make_float4( bad_color, 0.0f );
rtPrintExceptionDetails();
}

Find code doing that in this post: [url]Distance Field Camera Clipping Issue (Julia Demo) - OptiX - NVIDIA Developer Forums
Other helpful OptiX debugging code: [url]https://devtalk.nvidia.com/default/topic/973192/?comment=5004330[/url]

And if you want to call rtPrintExceptionDetails() like in your code snippet above, you’ll need to enable internal OptiX printing, following the code Detlef linked. That’s about the only use of OptiX printing; regular CUDA printf is very reliable now and should be used for ordinary debugging.