Crash while validating a context

After setting up my geometry in optix, I’m trying to validate the context by calling m_context->validate(). Hoever, it crashes inside this function without throwing any exceptions. What can be the problem?

Ok, I solved the context validation crash and the context compiles fine as well. Now I get the following error after launching the context.

Invalid value (Details: Function “_rtContextLaunch1D” caught exception: Invalid vertex buffer size. Possible reasons: no index buffer specified or stride too large., [4129415])

Any idea?

Are you using an Sbvh or TriangleKdTree acceleration structure that allows you to specify a stride with rtAccelerationSetProperty? If so, are you specifying the appropriate stride length in bytes? If you do not specify the stride length, it is assumed that your vertex buffer is tightly packed.

Thanks, I found the bug…
It was that Optix internally uses the name vindex_buffer, but I changed it to index_buffer in my believing that’s enough and setting index_buffer, but not vindex_buffer as well. Now I changed the name of index_buffer to vindex_buffer and everything works.

You can use any name you want for the index buffer. You just need to use rtAccelerationSetProperty to let OptiX know the name you are using.

Everything works fine up to setting up the geometry and validating, compiling the context and building the AS by launching the context with 0,0 parameters. But I have another crash after launching the context with width, height parameters. It doesn’t throw any exception.

Ok, you did something and it crashed.

  • What kind of crash in which module at what offset?
  • Or is this a display driver stopped working issue (TDR)?
  • A description of what exactly you did would be helpful. Code maybe?

Please always provide the system configuration information when reporting any issue.

  • OS version, OS bitness, installed GPUs, display driver version, OptiX version, CUDA version.