tudelft3d / pprepair

Validation and Automatic Repair of Planar Partitions
GNU General Public License v3.0
57 stars 22 forks source link

"Segmentation fault: 11" after installation with an error #24

Closed samuelestabrook closed 8 years ago

samuelestabrook commented 9 years ago

Hi, First, thank you so much for maintaining pprepair - it is very useful for helping clean-up bad data! I just tried to use it again and I received a Segmentation fault error (11) when running pprepair on my Mac (Yosemite 10.10.3). Dependency versions are as follows:

When installing with CMake, there is an error that I could only assume was due to CGAL 4.6, but installing previous versions of CGAL didn't fix the issue. Maybe it's something to do with the Yosemite update?

Any help would be great. I'm working on setting up a virtual machine so I can maintain a working version of pprepair without worrying about Apple's (or others') updates. Thank you!

Scanning dependencies of target pprepair
[ 20%] Building CXX object CMakeFiles/pprepair.dir/FaceInfo.cpp.o
[ 40%] Building CXX object CMakeFiles/pprepair.dir/IOWorker.cpp.o
In file included from /Users/path/pprepair/IOWorker.cpp:22:
In file included from /Users/path/pprepair/IOWorker.h:26:
In file included from /Users/path/pprepair/definitions/CGALDefinitions.h:42:
In file included from /usr/local/Cellar/cgal/4.6/include/CGAL/Constrained_Delaunay_triangulation_2.h:25:
In file included from /usr/local/Cellar/cgal/4.6/include/CGAL/Constrained_triangulation_2.h:28:
In file included from /usr/local/Cellar/cgal/4.6/include/CGAL/Triangulation_2.h:38:
In file included from /usr/local/Cellar/cgal/4.6/include/CGAL/Triangulation_data_structure_2.h:38:
/usr/local/Cellar/cgal/4.6/include/CGAL/Compact_container.h:1150:13: warning: 
      reference cannot be bound to dereferenced null pointer in well-defined C++
      code; comparison may be assumed to always evaluate to false
      [-Wtautological-undefined-compare]
    return &*rhs == NULL;
            ^~~~    ~~~~
/usr/local/Cellar/cgal/4.6/include/CGAL/Triangulation_data_structure_2.h:697:10: note: 
      in instantiation of function template specialization
      'CGAL::internal::operator==<CGAL::Compact_container<CGAL::Triangulation_face_base_with_info_2<FaceInfo,
      CGAL::Epeck, CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_face_base_2<CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_vertex_base_2<void> >,
      CGAL::Triangulation_face_base_with_info_2<FaceInfo, CGAL::Epeck,
      CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_face_base_2<void> > > > > > > > >, CGAL::Default,
      CGAL::Default, CGAL::Default>, false>' requested here
  if (fc == 0) return false;
         ^
/usr/local/Cellar/cgal/4.6/include/CGAL/Triangulation_2.h:894:15: note: in
      instantiation of member function
      'CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_vertex_base_2<void> >,
      CGAL::Triangulation_face_base_with_info_2<FaceInfo, CGAL::Epeck,
      CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_face_base_2<void> > > > >::is_edge' requested here
  return _tds.is_edge(va, vb, fr, i);
              ^
/Users/path/pprepair/IOWorker.cpp:347:25: note: 
      in instantiation of member function 'CGAL::Triangulation_2<CGAL::Epeck,
      CGAL::Triangulation_data_structure_2<CGAL::Triangulation_vertex_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_vertex_base_2<void> >,
      CGAL::Triangulation_face_base_with_info_2<FaceInfo, CGAL::Epeck,
      CGAL::Constrained_triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_face_base_2<CGAL::Epeck,
      CGAL::Triangulation_ds_face_base_2<void> > > > > >::is_edge' requested here
                                        if (!triangulation.is_edge(*previ...
                                                           ^
/usr/local/Cellar/cgal/4.6/include/CGAL/Compact_container.h:1095:15: note: 
      'operator*' returns a reference
    reference operator*() const { return *(m_ptr.p); }
              ^
1 warning generated.
[ 60%] Building CXX object CMakeFiles/pprepair.dir/PlanarPartition.cpp.o
[ 80%] Building CXX object CMakeFiles/pprepair.dir/PolygonHandle.cpp.o
[100%] Building CXX object CMakeFiles/pprepair.dir/pprepair.cpp.o
Linking CXX executable pprepair
[100%] Built target pprepair
kenohori commented 9 years ago

Thanks for the compliments! I just tested pprepair on Yosemite and CGAL 4.6. It seems to work fine for me even with big datasets. Could you maybe send us the dataset that is causing you the segfault? Regarding the compilation warning that you posted, it is a small issue with CGAL and clang (which is more picky about proper C++ code than gcc), but it should not cause any problems.