每日积累(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.
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.
相关文章推荐
- 每日积累(20170819-day-25)(Ubuntu Nvidia Driver loop in sign)
- 每日积累(20161208-day-14)(ubuntu OpenNI安装)
- 每日积累(20170819-day-25)(set default qt for ubuntu)
- 每日积累(20161123-day-7)(python安装 ubuntu桌面消失 )
- 每日积累(20161209-day-15)(VTK7.1编译OpenGL&OpenGL2 PCL1.8)
- 每日积累(20161212-day-16)(PHILIPS 272P 显示器webcam ,ubuntu使用)
- 每日积累(20161220-day-20)(ubuntu 远程登录ssh安装使用 创建ubuntu用户)
- 每日积累(20161221-day-21)(ubuntu16.04挂载exfat格式磁盘 py-faster-caffe&cudnn5编译 axel下载使用)
- 每日积累(20161219-day-19)(shell &bash学习 make&cmake&qmake)
- 每日积累(20161202-day-10)(依赖vtk库的编译 gdb调试)
- ubuntu segmentation fault 段错误
- 每日积累(20161205-day-11)(opencv-python)
- 每日积累(20161206-day-12)(python调试 vim-python)
- Ubuntu16.04 display setting (xfce4-display-settings) segmentation fault 闪退
- 每日积累(20170819-day-25)(Nvidia CUDA_ARCH_BIN & CUDA_ARCH_PTX setting)
- 每日积累(20161026-day-2)(dim3 vim-YouCompleteMe)
- 每日积累(20161207-day-13)(python.os caffe-draw_net.py)
- segmentation fault问题解决(ubuntu python, mysql )
- 每日积累(20161027-day-3)(Makefile := ?= += = memset)
- apt-get "Segmentation faultsts ... x%":升级Ubuntu9.04到10.04中的错误