[vtk-developers] TestBunykRayCastFunction failure; invalid double > uint8 cast

Sean McBride sean at rogue-research.com
Fri Mar 22 15:07:54 EDT 2013


Hi all,

The "vtkRenderingVolumePython-TestBunykRayCastFunction" test fails intermittently on Rogue11 so I ran it through the clang undefined behaviour checker, and it detects that this test casts the double value 257.023810 to 'unsigned char', which of course doesn't fit.  Dunno if this is responsible for the intermittent failure, but...

In vtkUnstructuredGridPreIntegration.cxx line 293-294 there is a 'for' loop that calls SetTuple1(0, foo) where 'foo' is too big on the last iteration.  I logged all values of foo:

 0.000000
 2.023810
 4.047619
...
 252.976190
 255.000000
 257.023810

Maybe the loop executes once too many times?  Anyone know this code?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtk-developers mailing list