Segmentation fault when reading ply files using Qt

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Segmentation fault when reading ply files using Qt

jiaxingzhang

Hi, everyone,


I am going to read ply files using load loadPLYFile in PCL, but I failed because there was an segmentation fault as shown below. It stopped at line 510. My codes are as following the picture. I'm not sure whether it's has something do to with the configuration of PCL.  The file Frame0.ply is in the attachment. Could anyone help me to solve it? I have been stuck for quite a long time. Thanks very much!



#include <iostream>
#include <pcl/io/ply_io.h>
#include <pcl/point_types.h>

int
main ()
{
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);

 if (pcl::io::loadPLYFile<pcl::PointXYZ>("/home/jiaxing/plyreading/plyreading/Frame0.ply", *cloud) == -1) //* load the file
 {
   PCL_ERROR ("Couldn't read file test_ply.ply \n");
    return (-1);
  }
return 0;
}


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

Frame0.ply (3M) Download Attachment