Function "_rtContextLaunch2D" caught exception


If the scene includes texture - the application exits with exception:
“Unknown error (Details: Function “_rtContextLaunch2D” caught exception: Encountered a CUDA error: driver().cuGraphicsMapResources(static_cast(m_interopResourceVector.size()), &m_InteropResourceVector[0], stream) returned (716) Unknown, [3735753]”

If no texture - no exception.
OptiX 3.8.0 driver 358.50 card GTX 745.
The precompiled samples run.

The application runs without exceptions on other cards, for example GT 630.

The application run with earlier drivers and earlier OptiX versions too.

How to find the error quelle?
Ca anyone give me advice?

oac00000-3-8-0.rtf (1.04 KB)

Would you be able to provide a minimal OptiX API Capture (OAC) of this failing configuration?
Please see this thread for instructions how to do that:


thank you for answer. (I had no hope any more).
I have set environment variable OPTIX_API_CAPTURE to 1, and now my application
version 3.8.0 exits at all computers, include my development computer (Geforce 630, dr. 358.50).
The last called function is rtBufferCreateFromGLBO().

My application with version 3.6.3 runs with this environment variable without problems.

oac00000-3-8-0.rtf (1.04 KB)

That failure with OAC enabled could be a known problem. You’re using an OpenGL interop buffer and the OAC tracing checks with glIsBuffer() if that is a valid buffer before reading out its contents for tracing. But the OpenGL driver will return false for that check if the buffer object ID has only been generated but the buffer itself doesn’t contain any data, yet.
This OAC specific issue will be solved in a future OptiX release. Until then to get the OAC tracing going, please set some data into that buffer, e.g. by calling glBufferData() with a non-zero size on that buffer object.

In the trace.oac file I see that you’re using 32-bit. Support for 32-bit has been removed for many GPU configurations in the newer CUDA Toolkits and drivers. Assuming you’re using CUDA Toolkit 7.0 please see chapter 3 in this document
I would not recommend to do any GPU ray tracing in 32-bit. The next major OptiX version won’t support it at all.

If possible please convert your OptiX application to 64-bit and see if that solves the issue.
If it still fails while the tracing with the OpenGL interop buffer has been worked around successfully, please send us all contents of the most recent oac* folder done on the failing GPU configuration as archive.
When sending *.zip files as e-mail attachment, please rename the extension to *.zi_ to let it pass our SPAM filters.

Thank you for answer.

I will try to convert OptiX application to 64 bit.
(Until now i have used VS 2005 Express and have not seen the possibility to
generate 64 bit application.)

That would not be simple to add to that old MSVS express version. AFAIR there was a method to install a Windows SDK next to it and then hack the vcvars.bat to pick the 64-bit compiler, but you’ll probably don’t even find the matching SDK files from Microsoft for that old version anymore. Things have moved to the “Community” editions of MSVS.

Also MSVS 2005 isn’t supported by recent CUDA Toolkits, neither are the newest MSVS 2015 versions.
Which CUDA Toolkit are you using?

I would strongly recommend to get some MSVS 2013 version for OptiX 3.8.0 and CUDA 7.0 development at this time.
I’m not using any MSVS Community edition so I’m unsure if that has changed in the meantime. There might be posts on the CUDA forums explaining how to develop 64-bit CUDA applications on free MSVS compilers.

Thank you very much for the quick answer.

I use CUDA Toolkit 5.0.
I will try to follow your advice.

See attachment please

“I use now CUDA 7.0, MSVS 2013 Express, with Platform: Activ(x64)”

Do you mean MSVS 2013 Community?

In which order did you install the packages? MSVS 2013 Community before CUDA Toolkit? If not try installing the CUDA Toolkit again.

Otherwise, please follow the instructions inside the CUDA_Getting_Started_Windows.pdf you’ll find in your CUDA Toolkit 7.0 installation doc folder first. Only if you got that working you should try building OptiX projects.

For OptiX SDK example builds please follow the instructions in the top-most OptiX SDK 3.8.0/SDK/CMakeLists.txt. That explains step-by-step how to build the SDK examples yourself.

In the CMake GUI, clear your cache before if rebuilding projects after any SDK installation change.

I would generally not recommend to work under C:/Program Files/* as destination for any code development projects. That is a protected folder under Windows and you might not be able to write there as user.

Thank you very much for quick answer!

I have downloaded install file 2 months ago. I suppose it was not from Community, i am not sure.
Is it important?
The file is VS2013.5_dskexp_DEU.iso with size 3.915.000.952 byte.
VS was installed in C:\Program Files (x86)\Microsoft Visual Studio 12.0
CUDA Toolkit 7.0 would be installed later.

So, i will try to follow your advice.

Very funny. Of course using a supported host compiler setup is important, as you noticed. The CUDA Toolkit 7.0 CUDA_Getting_Started_Windows.pdf documentation contains all information you need to setup a working CUDA development environment.

I think this would be MSVS 2013 Community:
The installer there is 1.2 MB, the one for MSVS 2015 is 2.9 MB.
De-install your MSVS 2013 Express edition first.

Most other links to MSVS Community editions point to the version 2015 site, but MSVS 2015 is not supported in CUDA 7.0 which is the maximum version OptiX 3.8.0 supports.

Thank you.
I have downloaded MSVS 2013 Community and follow your advice.

Thank you very much for advice.
At least the samples would be compiled.

Thank you very much, Detlef,
All works now.