-
Notifications
You must be signed in to change notification settings - Fork 9
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
Cannot parse multi-polygon #4
Comments
Thanks for making the test! |
Ack! don't leave me hangin'!!!! I've been doing some debugging of my own but don't have a solid idea yet - can you give a newbie a 2min version of your idea? |
Sure. The same thing needs to be done for Geometry. What's happening in some cases is that the functions that convert between Haskell types and C types are unclear about whether the sub-geometries they want are ones that maintain parent ownership and ones that do not maintain parent ownership. So in a couple places we're adding a finalizer to an object whose parent (which retains ownership) already has a finalizer attached. The first one deallocates the child object through the parent, and the one attached to the child results in a "pointer being freed was not allocated" error. The solution that I've started on is creating a Geometry class, which has instances for Geom (a type with a finalizer) and GeomConst (a type without a finalizer). Most functions will use the instance method for accessing these, but certain functions that expect the object to maintain parent ownership can specify that in their type. Does that make sense? |
Have you seen this issue after recent fixes? |
No i'm pretty sure this was closed off in an earlier PR. |
Hi,
I'm having real problems with MultiPolygons which I think I have reproduced in the tests (branch PR is here: #3)
Basically the following hex encodes a multi polygon
which looks like this when it's parsed
But testing this seems to cause seg faults.
Happy to help with debugging this but don't really know where to start.
The text was updated successfully, but these errors were encountered: