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

Will Schroeder will.schroeder at kitware.com
Fri Mar 22 15:59:51 EDT 2013


Based on the fact that the values are not integral and have
a slight fractional component (which I bet was the expectation of the
writer), the loop has not been properly set up with too much increment
going on....but I'm saying this without looking at the code so what do I
know :-)
W


On Fri, Mar 22, 2013 at 3:07 PM, Sean McBride <sean at rogue-research.com>wrote:

> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
William J. Schroeder, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130322/b4ccb40f/attachment.html>


More information about the vtk-developers mailing list