You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using geos in golang using a wrapper. I'm getting a SIGSEV because of destroy coordseq.
Not exactly the code but I'm doing something like:
*GeosGeometry g;
// define g somehow
r = GEOSGetExteriorRing_r(handle, g);
seq = GEOSGeom_getCoordSeq_r(handle, r);
GEOSCoordSeq_destroy_r(handle, seq);
GEOSGeom_destroy_r(handle, g);
As I said, this is not exactly the code since I'm using go, but those are the calls to the Geos library.
If I comment GEOSCoordSeq_destroy_r then I don't get the SIGSEV. Is the coordseq using an internal memory from the polygon? In the case of Exterior Ring it is, but it is documented in the headers file geos_c.h.
I'm using version 3.9.0dev
Thanks
The text was updated successfully, but these errors were encountered:
Yes, the coordseq is owned by the polygon, which is why GEOSGeom_getCoordSeq_r returns a const pointer. It's surprising that you're able to call GEOSCoordSeq_destroy_r on it at all. I guess the wrapper is removing the const-ness somehow.
Hi,
I'm using geos in golang using a wrapper. I'm getting a SIGSEV because of destroy coordseq.
Not exactly the code but I'm doing something like:
As I said, this is not exactly the code since I'm using go, but those are the calls to the Geos library.
If I comment GEOSCoordSeq_destroy_r then I don't get the SIGSEV. Is the coordseq using an internal memory from the polygon? In the case of Exterior Ring it is, but it is documented in the headers file geos_c.h.
I'm using version 3.9.0dev
Thanks
The text was updated successfully, but these errors were encountered: