您的位置:首页 > 其它

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

2017-09-11 15:29 555 查看
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 fault
Thread 1 "pcd_viewer" received signal SIGSEGV, Segmentation fault.
__mempcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:201
201 ../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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  segmentationfault