[PostGIS] #5946: FindTopology(toTopoGeom) crashing on berrie64 garden tests Infinite Point

PostGIS trac at osgeo.org
Fri Jul 18 00:35:38 PDT 2025


#5946: FindTopology(toTopoGeom) crashing on berrie64 garden tests Infinite Point
-----------------------+---------------------------
  Reporter:  robe      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  blocker   |  Milestone:  PostGIS 3.6.0
 Component:  topology  |    Version:  3.5.x
Resolution:            |   Keywords:
-----------------------+---------------------------
Comment (by strk):

 GDB trace:
 {{{
 Program received signal SIGSEGV, Segmentation fault.
 lwt_GetFaceContainingPoint (topo=topo at entry=0x556a7b7fea68,
 pt=pt at entry=0x556a7b804a38) at topo/lwgeom_topo.c:7751
 7751      double r = ( (p->x-A->x) * (B->x-A->x) + (p->y-A->y) *
 (B->y-A->y) )/( (B->x-A->x)*(B->x-A->x) +(B->y-A->y)*(B->y-A->y) );
 (gdb) bt
 #0  lwt_GetFaceContainingPoint (topo=topo at entry=0x556a7b7fea68,
 pt=pt at entry=0x556a7b804a38) at topo/lwgeom_topo.c:7751
 }}}

 The starting topology is full of empty line edges, which should probably
 be forbidden:
 {{{
 strk at postgis_garden=# select count(*), st_astext(geom) from topo_test.edge
 group by 2 order by 1 desc limit 5;
  count |                          st_astext
 -------+-------------------------------------------------------------
    163 | LINESTRING EMPTY
      6 | LINESTRING(40.2 60.300000000000004,60.300000000000004 40.2)
      5 | LINESTRING(20.1 60.300000000000004,40.2 40.2)
      4 | LINESTRING(40.2 40.2,60.300000000000004 20.1)
      4 | LINESTRING(0 60.300000000000004,20.1 60.300000000000004)
 (5 rows)
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5946#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