I use the STL through vtkstd:

  vtkstd::vector<vtkstd::vector<vtkstd::vector<double> > > grid;
  [...]
  this->grid.clear();
  this->grid = vtkstd::vector<vtkstd::vector<vtkstd::vector<double> > 
>(this->grid_xsize*this->grid_ysize);

It works well on VTK but on PV I can this error at run time:

  terminate called after throwing an instance of 'std::bad_alloc'
  what():  St9bad_alloc

If I change the initialization line by:

  this->grid.resize(this->grid_xsize*this->grid_ysize);

I get another message:

  terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_fill_insert

which means that the memory allocation by the vtkstl library crashes.
Does anybody know about this issue?


_________________________________________________________________
Un avatar à votre image ? Créez votre mini-moi !
http://www.ilovemessenger.fr/minimize-me/
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to