A Small problem...

Sathya Krishnamurthy (CSCS) skrishna at cscs.ch
Mon Feb 21 12:28:41 EST 2000


Hello All

I hit something.. but i dont know if it was a bug..

it was in.. vtkUnstructuredGrid::SetCells

It occurs just in WindowsNT/VC++6.0/compiled vtk31beta for me.. the code
works fine in 
Solaris/IRIX.. so i  dont know exactly what is happening..

So somebody kindly elucidate..

void vtkUnstructuredGrid::SetCells(int *types, vtkCellArray *cells)
{
  int i, npts, *pts;

....
...
  // build types
  for (i=0, cells->InitTraversal(); cells->GetNextCell(npts,pts); i++)
    {
............../// Here the program returns 
............../// some arbitrary values .. after the array size..
............../// so it goes over the bounds..
.
............../// so when it reaches the lastelement of the array
............../// GetNextCell gives me some big negative values for npts
............../// and crashes..
............../// So i had to add a small hack like
............../// that is if the npts returns
............../// a large negative number..

	if (npts < 0)
		break;

   
this->Cells->InsertNextCell(types[i],cells->GetTraversalLocation(npts));
    }
}
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list