Advertisement

空指针问题——半天调试

阅读量:

1问题描述

在将PCL的颜色区域增长分割这一小功能集成到界面过程中,出现了程序异常退出的情况,无论用户点击界面的任何位置,系统都会立即终止运行,并伴随以下错误提示内容:

复制代码
    main: /usr/include/boost/smart_ptr/shared_ptr.hpp:641:typename boost::detail::sp_dereference<T>::type boost::shared_ptr<T>::operator*() const [with T = pcl::PointCloud<pcl::PointXYZRGB>; typename boost::detail::sp_dereference<T>::type = pcl::PointCloud<pcl::PointXYZRGB>&]: 假设 ‘px != 0’ 失败。
    Aborted
    Makefile:10: recipe for target 'run' failed
    make: *** [run] Error 134
    
      
      
      
      
    

2 问题解决

通过网络搜索得知,最初误以为是定义了boost智能指针但未为其分配内存空间,如下所示的情形:

复制代码
    pcl::PointCloud<p

全部评论 (0)

还没有任何评论哟~