[osg-users] Volume image crash on the latest version of Nvidia driver

Clement.Chu at csiro.au Clement.Chu at csiro.au
Mon Aug 10 22:51:24 PDT 2015

Hi Robert,

   Finally, I found out where causes the crash problem.  The problem is not related to the type casting.  See the source code below:

float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);

   The problem is the value of num_iterations is a NaN float value (not a number), so that why it makes an infinite running in the loop and then crashed.  I think the problem is on the method length().  In some condition (different values of t0 and te) makes the method length() to return a NaN value.  I added a line of code to check variable num_iterations.

  if (isnan(num_iterations)) num_iterations = 2.0;

  So far it works on both nvidia and intel cards.


From: osg-users [osg-users-bounces at lists.openscenegraph.org] on behalf of Robert Osfield [robert.osfield at gmail.com]
Sent: Monday, 10 August 2015 17:42
To: OpenSceneGraph Users
Subject: Re: [osg-users] Volume image crash on the latest version of Nvidia     driver

Hi Clement,

I have been looking GLSL for what might help us determine when to use float vs ints.  The follow info might be useful:


Perhaps we should just add a #version 130 (OpenGL Version >= 3.0) to the top of the fragment shaders to make sure they support ints.  This may mean that the Intel driver fails though.

What Intel hardware, drivers and OpenGL version support by the drivers do you have on your system?


More information about the osg-users mailing list