[postgis-tickets] [PostGIS] #4723: ST_ApproximateMedialAxis SFCGAL crash on windows

PostGIS trac at osgeo.org
Wed Jul 15 08:35:26 PDT 2020


#4723: ST_ApproximateMedialAxis SFCGAL crash on windows
---------------------+---------------------------
  Reporter:  robe    |      Owner:  robe
      Type:  defect  |     Status:  assigned
  Priority:  medium  |  Milestone:  PostGIS 3.0.2
 Component:  sfcgal  |    Version:  2.5.x
Resolution:          |   Keywords:  windows
---------------------+---------------------------

Comment (by robe):

 Looks like it hasn't been fixed yet.  Algunenano tested building from
 sfcgal head (CGAL CGAL: 4.14.2) and he got the same crash.

 His trace is here
 {{{
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > > >::GetTrisegment
 (aV=..., this=0x7ffc871b3dc0) at
 /usr/include/boost/smart_ptr/intrusive_ptr.hpp:191
 191         T & operator*() const BOOST_SP_NOEXCEPT_WITH_ASSERT
 (gdb) bt
 #0
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > > >::GetTrisegment
 (aV=..., this=0x7ffc871b3dc0) at
 /usr/include/boost/smart_ptr/intrusive_ptr.hpp:191
 #1
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > >
 >::AreSkeletonNodesCoincident (aY=..., aX=..., this=0x7ffc871b3dc0) at
 /usr/include/CGAL/Straight_skeleton_builder_2.h:554
 #2
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > >
 >::MergeCoincidentNodes (this=this at entry=0x7ffc871b3dc0) at
 /usr/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h:1713
 #3  0x00007f87b4a61511 in
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > > >::FinishUp
 (this=0x7ffc871b3dc0) at /usr/include/c++/10.1.0/bits/stl_algo.h:3838
 #4
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > > >::Run
 (this=0x7ffc871b3dc0) at
 /usr/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h:1787
 #5
 CGAL::Straight_skeleton_builder_2<CGAL::Straight_skeleton_builder_traits_2<CGAL::Epick>,
 CGAL::Straight_skeleton_2<CGAL::Epick, CGAL::Straight_skeleton_items_2,
 std::allocator<int> >,
 CGAL::Dummy_straight_skeleton_builder_2_visitor<CGAL::Straight_skeleton_2<CGAL::Epick,
 CGAL::Straight_skeleton_items_2, std::allocator<int> > >
 >::construct_skeleton (this=this at entry=0x7ffc871b3dc0,
 aNull_if_failed=aNull_if_failed at entry=true)
     at
 /usr/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h:1797
 #6  0x00007f87b4a35085 in
 CGAL::create_interior_straight_skeleton_2<__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Epeck>*,
 std::vector<CGAL::Point_2<CGAL::Epeck>,
 std::allocator<CGAL::Point_2<CGAL::Epeck> > > >,
 std::_List_const_iterator<CGAL::Polygon_2<CGAL::Epeck,
 std::vector<CGAL::Point_2<CGAL::Epeck>,
 std::allocator<CGAL::Point_2<CGAL::Epeck> > > > >, CGAL::Epick>
 (aHolesEnd=..., aHolesBegin=..., aOuterContour_VerticesEnd=...,
 aOuterContour_VerticesBegin=...)
     at /usr/include/CGAL/create_straight_skeleton_2.h:84
 #7  SFCGAL::algorithm::(anonymous namespace)::straightSkeleton (poly=...)
 at /home/raul/.cache/yay/sfcgal-
 git/src/sfcgal/src/algorithm/straightSkeleton.cpp:191
 #8  0x00007f87b4a3662b in SFCGAL::algorithm::approximateMedialAxis (g=...)
 at /home/raul/.cache/yay/sfcgal-
 git/src/sfcgal/src/algorithm/straightSkeleton.cpp:359
 #9  0x00007f87b4ac10cc in sfcgal_geometry_approximate_medial_axis
 (ga=0x55637a58ed30) at /home/raul/.cache/yay/sfcgal-
 git/src/sfcgal/src/capi/sfcgal_c.cpp:782
 #10 0x00007f87b50331f9 in sfcgal_approximate_medial_axis
 (fcinfo=<optimized out>) at lwgeom_sfcgal.c:319
 #11 0x00005563793c073d in ExecInterpExpr (state=<optimized out>,
 econtext=<optimized out>, isnull=0x7ffc871b43df) at execExprInterp.c:649
 #12 0x000055637948a67e in ExecEvalExprSwitchContext (state=0x55637a556a90,
 econtext=0x55637a5458a0, isNull=0x7ffc871b43df) at
 ../../../../src/include/executor/executor.h:307
 #13 evaluate_expr (expr=<optimized out>, result_type=11198173,
 result_typmod=-1, result_collation=0) at clauses.c:4812
 #14 0x000055637948b0fd in evaluate_function (funcid=12296625,
 result_type=11198173, result_typmod=-1, result_collid=0, input_collid=0,
 args=0x55637a5209c8, funcvariadic=<optimized out>, context=0x7ffc871b4750,
 func_tuple=<optimized out>)
     at clauses.c:4354
 #15 simplify_function (funcid=<optimized out>, result_type=11198173,
 result_typmod=-1, result_collid=0, input_collid=0, args_p=<optimized out>,
 funcvariadic=<optimized out>, process_args=<optimized out>,
 allow_non_const=true, context=0x7ffc871b4750)
     at clauses.c:3984
 #16 0x0000556379489523 in eval_const_expressions_mutator
 (node=0x55637a51f988, context=0x7ffc871b4750) at clauses.c:2477
 #17 0x0000556379420e39 in expression_tree_mutator (node=0x55637a51fa08,
 mutator=0x5563794889c0 <eval_const_expressions_mutator>,
 context=0x7ffc871b4750) at /usr/include/bits/string_fortified.h:34
 #18 0x0000556379488acb in eval_const_expressions_mutator
 (node=0x55637a51fa08, context=0x7ffc871b4750) at clauses.c:3539
 #19 0x0000556379421116 in expression_tree_mutator (node=<optimized out>,
 mutator=0x5563794889c0 <eval_const_expressions_mutator>,
 context=0x7ffc871b4750) at nodeFuncs.c:3012
 #20 0x0000556379488acb in eval_const_expressions_mutator
 (node=0x55637a51f9d8, context=0x7ffc871b4750) at clauses.c:3539
 #21 0x00005563794889a0 in eval_const_expressions (root=<optimized out>,
 node=0x55637a50c9f0) at clauses.c:2269
 #22 0x0000556379471e3b in preprocess_expression (root=0x55637a51fb08,
 expr=0x55637a5458a0, kind=1) at planner.c:1087
 #23 subquery_planner (glob=<optimized out>, parse=0x55637a464d18,
 parent_root=<optimized out>, hasRecursion=<optimized out>,
 tuple_fraction=0) at planner.c:769
 #24 0x000055637947143f in standard_planner (parse=0x55637a464d18,
 cursorOptions=256, boundParams=0x0) at planner.c:406
 #25 0x0000556379544e91 in pg_plan_query (querytree=0x55637a464d18,
 cursorOptions=256, boundParams=0x0) at postgres.c:878
 #26 pg_plan_queries (querytrees=<optimized out>, cursorOptions=256,
 boundParams=0x0) at postgres.c:968
 #27 0x00005563795491a4 in exec_simple_query (
     query_string=0x55637a463580 "select
 st_approximatemedialaxis(st_geomfromtext('MULTIPOLYGON(((55115 56075,55915
 56075,55975 56075,55975 58675,56075 58675,56075 57425,57425 57425,57425
 56075,58775 56075,60025 56075,61375 56075,6137"...)
     at postgres.c:1143
 #28 0x0000556379546ccb in PostgresMain (argc=<optimized out>,
 argv=<optimized out>, dbname=<optimized out>, username=<optimized out>) at
 postgres.c:4243
 #29 0x00005563794b9686 in BackendRun (port=0x55637a489560) at
 postmaster.c:4448
 #30 0x00005563794b8cf4 in BackendStartup (port=0x55637a489560) at
 postmaster.c:4139
 #31 ServerLoop () at postmaster.c:1704
 #32 0x00005563794b5cb6 in PostmasterMain (argc=3, argv=0x55637a45d2a0) at
 postmaster.c:1377
 #33 0x000055637941eea5 in main (argc=3, argv=0x55637a45d2a0) at main.c:228
 (gdb)
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4723#comment:3>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list