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

A Crash bug occur in ST_PointOnSurface #11

Open
cuteDen-ECNU opened this issue Oct 29, 2023 · 1 comment
Open

A Crash bug occur in ST_PointOnSurface #11

cuteDen-ECNU opened this issue Oct 29, 2023 · 1 comment

Comments

@cuteDen-ECNU
Copy link
Owner

cuteDen-ECNU commented Oct 29, 2023

The following statement crashes PostGIS:
SELECT ST_PointOnSurface(g) FROM ST_GeomFromText('MULTIPOINT((0 0), EMPTY)') As g;
Here is stack information:

#0  geos::algorithm::InteriorPointPoint::add (this=0x7ffed776fe60, point=0x0)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/src/algorithm/InteriorPointPoint.cpp:69
#1  0x00007f62b0180f4a in geos::algorithm::InteriorPointPoint::add (this=0x7ffed776fe60, 
    geom=<optimized out>)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/src/algorithm/InteriorPointPoint.cpp:59
#2  0x00007f62b0180ff6 in geos::algorithm::InteriorPointPoint::InteriorPointPoint (
    this=<optimized out>, g=<optimized out>)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/src/algorithm/InteriorPointPoint.cpp:42
#3  0x00007f62b0197e85 in geos::geom::Geometry::getInteriorPoint (
    this=this@entry=0x556c1e75b880)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/src/geom/Geometry.cpp:189
#4  0x00007f62b089b0a8 in operator() (__closure=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
   gis-workshop-2020/geos/capi/geos_ts_c.cpp:1458
#5  execute<GEOSPointOnSurface_r(GEOSContextHandle_t, const geos::geom::Geometry*)::<lambda()> > (f=..., extHandle=0x556c1ea26be0)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/capi/geos_ts_c.cpp:408
#6  GEOSPointOnSurface_r (extHandle=0x556c1ea26be0, g1=0x556c1e75b880)
    at /home/wendy/PostGIS/postgis-workshop-2020/geos/capi/geos_ts_c.cpp:1457
#7  0x00007f62b09abb17 in lwgeom_pointonsurface (geom=<optimized out>)
    at lwgeom_geos.c:1074
#8  0x00007f62b08f8f80 in pointonsurface (fcinfo=0x556c1e6e8ef0) at lwgeom_geos.c:1535
#9  0x0000556c1d24a4f0 in ExecInterpExpr ()
#10 0x0000556c1d337c94 in evaluate_expr ()
#11 0x0000556c1d337ee1 in simplify_function ()
#12 0x0000556c1d338e7d in eval_const_expressions_mutator ()
#13 0x0000556c1d2b5a61 in expression_tree_mutator_impl ()
#14 0x0000556c1d2b5f04 in expression_tree_mutator_impl ()
#15 0x0000556c1d339de3 in eval_const_expressions ()
#16 0x0000556c1d31fcd8 in preprocess_expression ()
#17 0x0000556c1d327072 in subquery_planner ()
#18 0x0000556c1d327863 in standard_planner ()
#19 0x0000556c1d3e42bf in pg_plan_query ()
#20 0x0000556c1d3e43a1 in pg_plan_queries ()
#21 0x0000556c1d3e4680 in exec_simple_query ()
#22 0x0000556c1d3e6aae in PostgresMain ()
#23 0x0000556c1d36142e in ServerLoop ()
#24 0x0000556c1d36237c in PostmasterMain ()
#25 0x0000556c1d0b6cb1 in main ()

The version is the newest in GitHub:
POSTGIS="3.5.0dev 3.4.0rc1-705-g5c3ec8392" [EXTENSION] PGSQL="170" GEOS="3.13.0dev-CAPI-1.18.0" PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.13"

@cuteDen-ECNU
Copy link
Owner Author

cuteDen-ECNU commented Oct 30, 2023

bugtracker link: https://trac.osgeo.org/postgis/ticket/5595
fix link: 7d8455c
reproduce: 0dc1901

@cuteDen-ECNU cuteDen-ECNU added bug-confirm libgeos sytax trans Add point to the boundary of geometry and removed bug-confirm Generator labels Nov 1, 2023
@cuteDen-ECNU cuteDen-ECNU added crash and removed sytax trans Add point to the boundary of geometry labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant