PointCloudLibrary / PointCloudLibrary/pcl
[PCL] Remove `exit` with return to error values
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_surface.so.1.7.2
shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_tracking.so.1.7.2
shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_common.so.1.7.2
shlib-calls-exit usr/lib/x86_64-linux-gnu/libpcl_segmentation.so.1.7.2
in this libraries lintian has complain. Looking the sources it's about call the exit function:
surface:
src/3rdparty/opennurbs/zutil.c: exit(1);
include/pcl/surface/3rdparty/poisson4/multi_grid_octree_data.hpp: exit( 0 );
include/pcl/surface/3rdparty/poisson4/multi_grid_octree_data.hpp: if( idx<0 ) fprintf( stderr , "[ERROR] Found unindexed edge %d (%d,%d)\n" , idx , minDepth , maxDepth ) , exit( 0 );
include/pcl/surface/3rdparty/poisson4/allocator.h: if(!mem){fprintf(stderr,"Failed to allocate memory\n");exit(0);}
include/pcl/surface/3rdparty/poisson4/sparse_matrix.hpp: if( count>_maxEntriesPerRow ) fprintf( stderr , "[ERROR] Cannot set row size on contiguous matrix: %d<=%d\n" , count , _maxEntriesPerRow ) , exit( 0 );
include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: exit(0);
include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: exit( 0 );
include/pcl/surface/3rdparty/poisson4/octree_poisson.hpp: if( d<minDepth ) fprintf( stderr , "[ERROR] Node depth lower than min-depth: %d < %d\n" , d , minDepth ) , exit( 0 );
include/pcl/surface/3rdparty/poisson4/bspline_data.hpp: exit( 0 );
because the poisson and zutil code.
tracking:
include/pcl/tracking/impl/normal_coherence.hpp: exit (1);
common:
src/fft/kiss_fftr.c: exit(1);
src/fft/kiss_fftr.c: exit (1);
segmentation:
include/pcl/segmentation/impl/extract_clusters.hpp:/* @todo: fix the return value, make sure the exit is not needed anymore/
include/pcl/segmentation/impl/extract_clusters.hpp: exit(0);
Please fix/review this code for the next version.
Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the listed exit calls in the PCL surface, tracking, common, and segmentation paths, especially the Poisson, zutil, kiss_fftr, normal_coherence, and extract_clusters files. Review how each call can return an error value without terminating the process, then verify that the lintian shlib-calls-exit findings are resolved and the affected tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- computer-vision
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100