Hi dlacewell,
i’ve implemented an exception program and enabled device printing
context->setPrintEnabled(true);
context->setPrintBufferSize(1024);
and also enabled all exceptions:
context->setExceptionEnabled(RT_EXCEPTION_ALL, true);
I still get no more error information as stated in the original post.
So i tried to force some exceptions by adding a user exception to our launch program:
#define TEST_EXCEPTION_0 RT_EXCEPTION_USER + 0
RT_PROGRAM void launch_program(void)
{
rtThrow(TEST_EXCEPTION_0);
...
}
and the exception program works as expected:
RT_PROGRAM void exception(void)
{
const unsigned int code = rtGetExceptionCode();
if (code == RT_EXCEPTION_STACK_OVERFLOW)
output_buffer[launch_index] = make_color(bad_color);
else
{
rtPrintf("Caught exception 0x%X at launch index (%d,%d)\n", code, launch_index.x, launch_index.y);
rtPrintExceptionDetails();
}
}
I get exception output to our console window as it was meant to be.
So i removed the throw and tested the program with a single mesh which works great.
Then i switched to the next mesh:
void loadMesh(const std::string& filename)
{
if (optixRootGroup->getChildCount())
{
auto child = optixRootGroup->getChild<GeometryGroup>(0);
optixRootGroup->removeChild(0);
child->destroy();
}
... loading the next stl like the first one did ...
GeometryGroup geometry_group = context->createGeometryGroup();
geometry_group = context->createGeometryGroup();
geometry_group->addChild(mesh.geom_instance);
... setting acceleration mode and so one goes here ...
}
But then the _rtContextLaunch2D failed exceptions pops up.
As i discovered in the meantime this also happens to some of our meshes from our mesh pool when i load them first, but i don’t know if the internal error is the same here, as i again only get the rtContextLaunch2D error.
I’m, working on:
Windows 10 Pro, 64 bit
Intel Xeon E3-1245
32 GB Ram
Quadro M2000 using driver version 376.62
CUDA 8 SDK
Optix 4.0.2 SDK
VS2015
building an 64bit console application running OpenGL for visualization.
Thx for your help.