Issue 2534: vtkOpenGLImageActor::MakeDataSuitable() stuck in infinite while loop
Status:  Invalid
Owner: ----
Closed:  Mar 2014
Reported by da...@davidwt.com, Mar 7, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: VTK 5.6 and later

What steps will reproduce the problem?
difficult to reproduce outside of our large project. This is during an attempt to render a PNG on a different layer than a 3D model.

What is the expected output? What do you see instead?
vtkOpenGLImageActor::MakeDataSuitable() should not get stuck in an infinite loop, regardless of the input.
vtkOpenGLImageActor::MakeDataSuitable() is stuck inside the following loop because xsize is zero:
  // if contiguous is it a pow of 2
  if (contiguous)
    {
    xsize = ext[xdim*2+1] - ext[xdim*2] + 1;
    // xsize and ysize must be a power of 2 in OpenGL
    xs = static_cast<unsigned short>(xsize);
    while (!(xs & 0x01))
      {
      xs = xs >> 1;
      }
    if (xs == 1)
      {
      powOfTwo = 1;
      }
    }
  
Please provide any additional information below.
I know we are doing something wrong in setting up the data for rendering, but its difficult to discover what it is if VTK itself gets stuck and when I debug and force it pass the while loop above, it later has a floating divide by zero exception.

Mar 7, 2014
Project Member #1 edwin.ke...@gmail.com
Wrong issue tracker. This issue tracker is for the Gerrit Code Review project, but what you describe seems not to be related to Gerrit.
Status: Invalid