每日积累(20170911-day-27)(ubuntu pcl project segmentation fault)

来源:互联网 发布:windows自带剪辑软件 编辑:程序博客网 时间:2024/06/09 15:05

in ubuntu 16.04 build own project using Cmake/PCL/VTK/Qt

Some project built success in Win7/10 but failed in ubunt 16.04

the project can be compiled and run, but crashed with:

segmentation faultThread 1 "pcd_viewer" received signal SIGSEGV, Segmentation fault.__mempcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:201201../sysdeps/x86_64/memcpy.S: No such file or directory.

I found one bug today

char *filename;                                                   sprintf(filename, "/home/bbox_%s.txt ", filename);

it should be:

char filename[200];                                                   sprintf(filename, "/home/bbox_%s.txt ", filename);

it's work. The bug seems caused by using char* without initialization.

There are still some bugs like that, and I will find them later.



阅读全文
0 0
原创粉丝点击