Opened 3 days ago

Last modified 3 days ago

#5925 new defect

TopoGeo_AddPoint crash on infinite point

Reported by: robe Owned by: strk
Priority: medium Milestone: PostGIS 3.0.12
Component: topology Version: 3.5.x
Keywords: Cc:

Description (last modified by robe)

This one is harder to replicate, cause it only seems to happen with the test topology that the garden tests generated

SELECT TopoGeo_AddPoint('test', '0101000020E6100000000000000000F07F000000000000F07F'::geometry, 20.1)
         

Change History (3)

comment:1 by robe, 3 days ago

Description: modified (diff)

okay GHA is not complaining about this, so might be a windows only issue or maybe the ordering of the data in windows is setting up the topology state to crash.

Here is the backtrace from my PG18 beta1 VC++ EDB build.

lwt_GetFaceContainingPoint (topo=topo@entry=0x184720562d0, pt=pt@entry=0x18472050258) 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@entry=0x184720562d0, pt=pt@entry=0x18472050258) at topo/lwgeom_topo.c:7751
#1  0x00007ffda6a7289c in _lwt_AddIsoNode (topo=topo@entry=0x184720562d0, face=face@entry=-1, pt=pt@entry=0x18472050258, skipISOChecks=skipISOChecks@entry=0, checkFace=checkFace@entry=1) at topo/lwgeom_topo.c:554
#2  0x00007ffda6a733b5 in _lwt_AddPoint (topo=<optimized out>, topo@entry=0x184720562d0, point=point@entry=0x18472050258, tol=tol@entry=20.100000000000001, findFace=findFace@entry=1, moved=moved@entry=0x0) at topo/lwgeom_topo.c:6853
#3  0x00007ffda6a75538 in lwt_AddPoint (topo=topo@entry=0x184720562d0, point=point@entry=0x18472050258, tol=tol@entry=20.100000000000001) at topo/lwgeom_topo.c:6870
#4  0x00007ffda6a28eab in TopoGeo_AddPoint (fcinfo=0x18472042970) at postgis_topology.c:5040
#5  0x00007ff694c0e94d in postgres!ExecEvalXmlExpr ()
#6  0x00007ff694c53891 in postgres!ExecReScanResult ()
#7  0x00007ff694c19b8d in standard_ExecutorRun ()
#8  0x00007ff694e0be4b in postgres!PortalRunFetch ()
#9  0x00007ff694e0b81f in postgres!PortalRun ()
#10 0x00007ff694e091dd in postgres!die ()
#11 0x00007ff694e05197 in postgres!PostgresMain ()
#12 0x00007ff694e02533 in postgres!BackendMain ()
#13 0x00007ff694d4b2f1 in postgres!SubPostmasterMain ()
#14 0x00007ff694c83818 in postgres!main ()

comment:2 by robe, 3 days ago

As expected TopoGeo_LoadGeometry has the same issue:

SELECT TopoGeo_LoadGeometry('test', foo1.the_geom, 20.1)  As result
                                                        FROM ((SELECT '0101000020E6100000000000000000F07F000000000000F07F'::geometry AS the_geom ) ) As foo1 

and goes thru the same function.

comment:3 by robe, 3 days ago

same issue with ST_AddIsoNode, fails at same line

Note: See TracTickets for help on using tickets.