[vtk-developers] vtkFiltersAMRCxx-TestImageToAMR failure

Sean McBride sean at rogue-research.com
Mon Apr 6 14:12:23 EDT 2015


Utkarsh,

git blame suggests you know this test.  It's one of the few still failing on my torture dashboard.

I debugged it a bit, but of course it's tricky not knowing any of this stuff. :)

In TestImageToAMR.cxx line 120 (currently) is:

  vtkUniformGrid* grid = amr->GetDataSet(level,id);

The very first time that line is hit, 'grid' has an x spacing of zero.  From there things go bad, with divide by zero giving nan, and nan getting cast into int (which is undefined).

The source of the zero is vtkImageToAMR.cxx line 282:

  spacing0[d] = 0.0;

It looks a bit like an arbitrary placeholder, and if I change it to 666 the test then passes...

Is it indeed an arbitrary placeholder?  Could it be changed to 1.0?  Other solution?

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