Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PointOnSurface crashes with a collection containing a empty linestring #1002

Closed
robe2 opened this issue Nov 29, 2023 · 0 comments
Closed

PointOnSurface crashes with a collection containing a empty linestring #1002

robe2 opened this issue Nov 29, 2023 · 0 comments
Labels
Milestone

Comments

@robe2
Copy link
Member

robe2 commented Nov 29, 2023

Reported at https://trac.osgeo.org/postgis/ticket/5621

SELECT ST_PointOnSurface(ST_Collect(ARRAY[ST_GeomFromText('LINESTRING(0 0, 1 1)'), ST_GeomFromText('LINESTRING EMPTY')]))
#0  0x00007f05988a9848 in geos::algorithm::InteriorPointLine::add(geos::geom::Coordinate const&) ()
   from /usr/local/lib/libgeos.so.3.13.0
#1  0x00007f05988a993d in geos::algorithm::InteriorPointLine::addInterior(geos::geom::CoordinateSequence const*) ()
   from /usr/local/lib/libgeos.so.3.13.0
#2  0x00007f05988a99d8 in geos::algorithm::InteriorPointLine::addInterior(geos::geom::Geometry const*) ()
   from /usr/local/lib/libgeos.so.3.13.0
#3  0x00007f05988a9beb in geos::algorithm::InteriorPointLine::InteriorPointLine(geos::geom::Geometry const*) ()
   from /usr/local/lib/libgeos.so.3.13.0
#4  0x00007f05989044b5 in geos::geom::Geometry::getInteriorPoint() const ()
   from /usr/local/lib/libgeos.so.3.13.0
#5  0x00007f05990808af in GEOSPointOnSurface_r ()
   from /usr/local/lib/libgeos_c.so.1
#6  0x00007f05993d8649 in lwgeom_pointonsurface (geom=0x560078958718)
    at lwgeom_geos.c:1025
#7  0x00007f059930ab5c in pointonsurface (fcinfo=0x56007895ca10)
    at lwgeom_geos.c:1496
#8  0x000056007653aed0 in ExecInterpExpr ()
#9  0x000056007662a4a4 in evaluate_expr ()
#10 0x000056007662a6f1 in simplify_function ()
#11 0x000056007662b68d in eval_const_expressions_mutator ()
#12 0x00005600765a6881 in expression_tree_mutator_impl ()
#13 0x00005600765a6d5c in expression_tree_mutator_impl ()
#14 0x000056007662c5e3 in eval_const_expressions ()
#15 0x0000560076612418 in preprocess_expression ()
#16 0x0000560076619832 in subquery_planner ()
#17 0x000056007661a023 in standard_planner ()
#18 0x00005600766d721f in pg_plan_query ()
#19 0x00005600766d7301 in pg_plan_queries ()
#20 0x00005600766d75e0 in exec_simple_query ()
#21 0x00005600766d9a05 in PostgresMain ()
#22 0x0000560076653bce in ServerLoop ()
#23 0x0000560076654b1c in PostmasterMain ()
#24 0x00005600763a6bb1 in main ()

I confirmed with the latest build of GEOS 3.13 as of yesterday I still can trigger this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants