<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
I use the STL through vtkstd:<br><br> vtkstd::vector<vtkstd::vector<vtkstd::vector<double> > > grid;<br> [...]<br> this->grid.clear();<br> this->grid = vtkstd::vector<vtkstd::vector<vtkstd::vector<double> > >(this->grid_xsize*this->grid_ysize);<br><br>It works well on VTK but on PV I can this error at run time:<br><br> terminate called after throwing an instance of 'std::bad_alloc'<br> what(): St9bad_alloc<br><br>If I change the initialization line by:<br><br> this->grid.resize(this->grid_xsize*this->grid_ysize);<br><br>I get another message:<br><br> terminate called after throwing an instance of 'std::length_error'<br> what(): vector::_M_fill_insert<br><br>which means that the memory allocation by the vtkstl library crashes.<br>Does anybody know about this issue?<br><br><br /><hr />Un avatar à votre image ? <a href='http://www.ilovemessenger.fr/minimize-me' target='_new'>Créez votre mini-moi !</a></body>
</html>