I've narrowed it down to the cell1 and cell2 declarations. These objects are not playing nicely with CGAL's is_infinite, mirror_index, and neighbor functions.
Here is my working theory: The cell1 and cell2 handles originate down at the facet_circulator on line 195 where an arbitrary facet is defined by dereferencing the edge of interest. 195: RTriangulation::Facet_circulator facet1 = Tri.incident_facets(*edge); This is where I believe there may be a problem. facet1 does not appear to be the address of a facet, instead it appears to be the circulator. Am I right to say that in this case *facet1 is the facet that we are interested in using [1]? If so, we should be able to change lines 174 and 175 to: const CellHandle& cell1 = *facet->first; const CellHandle& cell2 = *facet->first->neighbor(*facet->second); But of course, the compiler says this is an invalid initialization of reference. [1] http://doc.cgal.org/latest/Circulator/index.html -- You received this bug notification because you are a member of Yade developers, which is subscribed to Yade. https://bugs.launchpad.net/bugs/1666339 Title: DFNflow crashes for compiled trunk but not non-optimized debug compiled trunk Status in Yade: New Bug description: Distro: Xenial 16.04LTS Yade Version: yade-2017-0207.git-11c276f Compilation: default compilation with debug flags and '#define DFNFLOW' uncommented in DFNFlow.cpp Summary: DFNFlowEngine crashes for compiled yade-2017-0207.git-11c276f sources. The segmentation fault also occurs for a debug compiled version and yields the attached core dump. Interestingly, the DFNFlowEngine does not crash for a non-optimized debug compilation of the same sources. Description of failure: According to the core dump, the failure can be traced back to DFNFlow.cpp:176, where it is checking if the cell is inifinite (although I have also had it fail at the permeability assignment directly below line 176 for a modified version of DFNflow.cpp). DFNFlow.cpp: 176: if ( Tri.is_infinite(cell1) || Tri.is_infinite(cell2)) cerr<<"Infinite cell found in trickPermeability, should be handled somehow, maybe"<<endl; 177: cell1->info().kNorm()[facet->second]=cell2->info().kNorm()[Tri.mirror_index(cell1, facet- >second)] = pow((aperture+residualAperture),3)/(12*viscosity); I am unsure why this line is causing a crash in the optimized-debug compiled code, but not the non-optimized-debug compiled code. My optimized-debug compiled executable is simply built with the flag -DDEBUG=ON. My non-optimized debug compiled code uses an edited CMakeLists.txt to avoid optimization: IF(CMAKE_COMPILER_IS_GNUCC) SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0") ENDIF(CMAKE_COMPILER_IS_GNUCC) The attached zip contains: mwe.py // input script liteSpecimen2mm.spheres // packing file jointSurf.stl // stl for smooth joint coreDump2.txt // core dump after executing mwe.py with optimized debug compiled yade Any assistance with this bug is greatly appreciated. To manage notifications about this bug go to: https://bugs.launchpad.net/yade/+bug/1666339/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : yade-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp