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

Assertion failed in InteriorPointPoint #176

Closed
cuteDen-ECNU opened this issue Nov 8, 2023 · 6 comments · Fixed by #193
Closed

Assertion failed in InteriorPointPoint #176

cuteDen-ECNU opened this issue Nov 8, 2023 · 6 comments · Fixed by #193

Comments

@cuteDen-ECNU
Copy link

This statement crashes the debug version of the DuckDB Spatial extension:

SELECT ST_PointOnSurface(g)  FROM (SELECT ST_GeomFromText('MULTIPOINT((0 0), EMPTY)') As g);

The assertion failed here:

duckdb: /duckdb_spatial/build/debug/deps/projects/Source/GEOS/src/algorithm/InteriorPointPoint.cpp:68: void geos::algorithm::InteriorPointPoint::add(const geos::geom::CoordinateXY*): Assertion `point' failed.

Version:

┌─────────────────┬────────────┐
│ library_version │ source_id  │
│     varchar     │  varchar   │
├─────────────────┼────────────┤
│ v0.9.2-dev209   │ 6545a55cfe │
└─────────────────┴────────────┘

The assertion failure is triggered using the latest nightly version of the Spatial extension.

@Maxxen
Copy link
Member

Maxxen commented Nov 8, 2023

Hi! Thanks for reporting this issue! Maybe next time you could link me directly to where it was fixed or reference the GitHub discussion when you're the owner of the original GEOS issue so I don't accidentally open new issue in GEOS or spend time on my own fix.

I'll see if I can update our GEOS bundle to latest main later this week.

@cuteDen-ECNU
Copy link
Author

Sorry for missing the original issue link.
Next time I will attach it.

@cuteDen-ECNU
Copy link
Author

To follow up on this, we did not know in advance that both of these test cases triggered the same underlying bug. We are currently developing an automated testing tool for testing spatial databases, and independently found test cases that crash PostGIS and DuckDB. Sorry again!

@Maxxen
Copy link
Member

Maxxen commented Nov 9, 2023

Alright, no problem!

I think automatically trying to fuzz/test spatial database systems and simple-features based libraries (duckdb-spatial, PostGIS, GEOS, etc.) sounds like an excellent idea! Keeping track of all the combinations of geometry subtypes, nestings, coordinate types (xy/xyz/xyzm), EMPTY/NULL is very hard, and I'm sure there are many more issues yet to be found.

Looking forward to see what you end up discovering and to receive more bug reports! Feel free to reach out if you have any questions about spatial-internals :)

@cuteDen-ECNU
Copy link
Author

I'm just checking whether an update is planned, so I could potentially report more issues. I would greatly appreciate this, but can understand that this might not be a high priority for you.

@Maxxen
Copy link
Member

Maxxen commented Nov 23, 2023

Im updating GEOS in #193 which should contain fixes for all the issues you found so far (including this one), but please feel free to report more issues (unless this is blocking) and I'll try fix them as soon as I can!

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

Successfully merging a pull request may close this issue.

2 participants