Dear all,<br><br>I have developped a program with use of VTK 5.10 C++ to perform velocity vector requests in a CFD data file.<br>I use vtkCellLocator class with method FindCell to identify in which cell I make my requests.<br>
So far, I have had no problem.<br>I encounter a first crash with a large input data set (5Go) (Linux 64bits with 32Go RAM)<br>The data I use to create is an ensight binary gold file that contains a hexamesh.<br>The crash occurs on a call to FindCell of vtkCellLocator class.<br>
The method FindCell produces a segmentation fault for one specific request.<br>The only information about this request I have is that the function crashes for a point close to the bounding box (close to and inside the bounding box).<br>
I filter my inputs with a bounding box test to ensure that my requests are located in the bounding box of my data set.<br>My function that calls FindCell is given at the end of this post.<br><br>I manage to compile the program with a debug version, however I didn&#39;t compile VTK in Debug mode<br>
Here is the gdb log I have<br>Program received signal SIGSEGV, Segmentation fault.<br>0x00002aaab15d44a8 in vtkAbstractCellLocator::FindCell (this=0x10f1050, x=0x7fffffff6790) at /softs/applis_src/VTK/VTK-5.10.0/Filtering/vtkAbstractCellLocator.cxx:183<br>
183 }<br>(gdb) bt<br>#0 0x00002aaab15d44a8 in vtkAbstractCellLocator::FindCell (this=0x10f1050, x=0x7fffffff6790) at /softs/applis_src/VTK/VTK-5.10.0/Filtering/vtkAbstractCellLocator.cxx:183<br>#1 0x3fa90f6b63a3ff81 in ?? ()<br>
#2 0x00007fffffff6790 in ?? ()<br>#3 0x00000000010f1050 in ?? ()<br>#4 0x00007fffffff67e8 in ?? ()<br>#5 0x00002aaaae5359d8 in findPointLocationFromAVectorOfCellLocator(std::vector&lt;vtkSmartPointer&lt;vtkCellLocator&gt;, std::allocator&lt;vtkSmartPointer&lt;vtkCellLocator&gt; &gt; &gt; const&amp;, double const*, lo ng long&amp;, long long&amp;) () from /home/etudes/simulator/binCmake/bin_Linux64/Release/libtoolsVtkInterfaceCPP.so<br>
<br>On the same dataset, I can also use vtkCellLocatorInterpolatedVelocityField, to perform my work.<br>With this class, I have reported no crash. However, I am not sure it makes the same point requests...<br><br>Do you have any advise?<br>
Compile VTK in Debug mode, to trace back the problem?<br>Any other solution?<br><br>Best regards,<br>Guillaume Jacquenot.<br><br>/**<br> * \brief returns the block id and cell id of an input point to locate in a vector of vtkCellLocator<br>
 * \param[in]  vectCellLocator Std vector of a cell locator<br> * \param[in]  pointToLocate Point to locate<br> * \param[out] idCellLocator Id of the block containing the input point<br> * \param[out] idCell Id of the cell containing the input point<br>
 * \return     hasCellBeenFound Boolean indicating that the cell has been found<br> */<br>bool findPointLocationFromAVectorOfCellLocator(<br>        const vtkstd::vector&lt;vtkSmartPointer&lt;vtkCellLocator&gt; &gt; &amp; vectCellLocator,<br>
        const double pointToLocate[3],<br>        vtkIdType&amp; idCellLocator,<br>        vtkIdType&amp; idCell)<br>{<br>    bool hasCellBeenFound = false;<br>    const int nVector = (int)(vectCellLocator.size());<br>    idCellLocator = 0;<br>
    idCell = 0;<br>    while ((hasCellBeenFound==false)&amp;&amp;(idCellLocator&lt;nVector))<br>    {<br>        idCell = vectCellLocator.at(idCellLocator)-&gt;FindCell(pointToLocate);<br>        if (idCell!=-1)<br>        {<br>
            hasCellBeenFound = true;<br>        }<br>        else<br>        {<br>            idCellLocator++;<br>        }<br>    }<br>    return hasCellBeenFound;<br>}<br><br><br>