pcl 1.8.1 bug in pcl_visualizer.hpp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

pcl 1.8.1 bug in pcl_visualizer.hpp

nenadpol
This post was updated on .
My system is windows7 x64  , pcl 1.8.1 x64 and VS 2015, vtk 1.64

Looking at pcl_visualizer.hpp line 293 to line 296 (void  convertPointCloudToVTKPolyData)

  vtkSmartPointer<vtkPoints> points;
  geometry_handler.getGeometry (points);
  polydata->SetPoints (points);


It is obvious that pointer "points" is newer initialized.
This has not coused problems in previous vtk versions but it does in vtk 1.64

Taking some examples from pcl documentation and compiling EXE application works fine but
when using pcl_visualizer in dll  than error is produced "Trying to read-write protected memory"
when executing line " polydata->SetPoints (points);"

This is not surprise taking into account that points = null

Adding a new line fix the problem


  vtkSmartPointer<vtkPoints> points;
  points = vtkSmartPointer<vtkPoints>::New();   //  NEW LINE
  geometry_handler.getGeometry (points);
  polydata->SetPoints (points);


thanks
Nenad


Reply | Threaded
Open this post in threaded view
|

Re: pcl 1.8.1 bug in pcl_visualizer.hpp

Tsukasa Sugiura
Hi Nenad,

Thank you for your report.
It might be bug. Please post to bug tracker.
I think that it is necessary to hear opinions from other developers.

https://github.com/PointCloudLibrary/pcl/issues

Best regards,
Tsukasa Sugiura

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users