Exception Handles Error (probably)

Hello,
I am really new in OptiX API and CUDA, was modifying an old rendering project, built on OptiX 5.1, CUDA toolkit 9.1 with visual studio 2015. After successfully linking all the 3rd party libraries, the BUILD was success. However the project is not running. There are several exceptions are thrown, in the optixpp_namespace.h. The output says:

Unhandled exception at 0x00007FFC781D4ED9 in ProjectName.exe: Microsoft C++ exception: optix::Exception at memory location 0x000000AB5590CF50.

Unhandled exception at 0x00007FFC3360D4FD (optix.51.dll) in ProjectName.exe: 0xC0000005: Access violation reading location 0x0000000000000008.´

I would appreciate if you could suggest any solution. I tried to google, but the solution is unavailable.

Hi @_Bi2022,

These are basically bad pointer accesses, which of course you will not find answers to on Google, because it’s too common and generic of a bug. You will need to debug it yourself to find the cause. I would recommend starting with the 2nd one - the value of 0x8 is clearly a bad pointer, so it should be straightforward to step through your program find out which call is passing that value and why the pointer is wrong.


David.

1 Like

Please always provide the following system configuration information when asking about OptiX issues:
OS version, installed GPU(s), VRAM amount, display driver version, OptiX (major.minor.micro) version, CUDA toolkit version (major.minor) used to generate the input PTX, host compiler version.

There would also be the chance that OptiX 5.1.0 isn’t supporting your graphics board. OptiX 5.1.0 was released before Turing GPUs. You could try using OptiX 6.5.0 instead.
I can build the old OptiX 5.1.0 based advanced examples (links in the sticky posts) with OptiX 6.5.0, CUDA 10.2 (not with CUDA 11.x) and MSVS 2019 and they still run on Ampere boards, though not optimally since they are not using built-in triangle primitives which didn’t exist before OptiX 6.

When starting with OptiX today please do not use this ten year old OptiX API anymore. Today beginners and new developments should always use OptiX 7 instead.

Many of the OptiX examples inside the SDK and on github have been available for the old API and the new OptiX 7 API, so if you have projects still using the old API, there are many examples which show how to port those over to OptiX 7.
There are also plenty of threads discussing exactly that on this sub-forum. Please use the search feature on the top right.

1 Like