Optix Error: Unknown error in MyApp::Trace()

Hey guys,

I am trying to run a small application that I wrote by using the OptiX samples as references. The application compiles just fine, but when I run the application I get the following error:

Optix Error: Unknown error(Details: Function “RT Result _rtContextLaunch2D (RTcontext_api*, unsigned int, RTSize, RTSize)” caught exception: Assertion failed: [5767628] )

By making use of debug commands, I realized that the error takes place in the following function:

void MyApp::Trace( )
{

    m_context->launch (0, static_cast<unsigned int>(_width), static_cast<unsigned int>(_height) );

 
}

I am a bit unsure of how to go about solving this. I have tried altering the parameters of the launch function as follows:

m_context->launch ( m_context, 0, static_cast<unsigned int>(_width), static_cast<unsigned int>(_height) );

This only changes the error to:

Optix Error: Unknown error(Details: Function “RT Result _rtContextLaunch3D (RTcontext_api*, unsigned int, RTSize, RTSize, RTSize)” caught exception: Assertion failed: [5767628] )

I am making use of a desktop running Ubuntu 12.04 LTS, CUDA 5.0, OptiX 3.0.1 and building with cmake. Graphics card is a GeForce 8800gt.

Can you post the device code / the OptiX programs you try to launch? The error is probably happening there.

Also: it sounds like you’re using/still referencing an uninitialized/destroyed variable or buffer. Please double check the dependencies for your program

I have not yet found a solution to my problem. Going to double check the dependencies now.

Concerning the OBJLoader in sutil, I am curious about the ASRefine char pointer that is passed to the constructor OBJLoader::OBJLoader. If I recall correctly, the OBJLoader constructor did not always have this parameter. I therefor just effectively passed ‘0’ to the constructor. Could this be a problem?

Thanks!

ASRefine is supposed to be “0”, not ‘0’.

Changing between ‘0’ and “0” had the same effect - I defined ASRefine as a char at first, not a std::string. Made sure that ASRefine is properly set such as was done in Sample 6. So now it actually is declared to have a value of “0”.

Anyway, I fixed my problem. The problem was with how I handled a buffer in my application.

Thanks guys.

Just to be clear, Mark was correct. I was referencing an uninitialized buffer.