GEOSGeometry function dies with error pure virtual method called message

44 views
Skip to first unread message

Saurabh Khanduja

unread,
Aug 2, 2018, 8:29:51 AM8/2/18
to Django users
Hi,
 This is the piece of code I am working with:-

poly = GEOSGeometry('Polygon((-951499 -1276279, '
 
'-951498 -1276279, '
 
'-951498 -1276278, '
 
'-951499 -1276278,'
 
'-951499 -1276279))', srid=5514).transform(4326)

On debugging, the file geometry.py it crashes on line 475:-

capi.destroy_geom(self.ptr)

I updated my gdal from 1.11.3 to 2.1.3, but still stuck with the same error.

For, now, I am passing clone=True to workaround this issue, but would like to know if there is a mistake on my part or report it if it is a bug.

Tim Graham

unread,
Aug 2, 2018, 10:28:43 AM8/2/18
to Django users
I'm not sure what you mean by "On debugging". Is that the complete code snippet to reproduce the issue? I don't see a crash on my system. Which Django version?

Saurabh Khanduja

unread,
Aug 2, 2018, 12:15:52 PM8/2/18
to Django users
The version of django is 2.0.4
Debugging - Just step into code where the program is crashing in transform function in file ~/anaconda3/envs/py35/lib/python3.5/site-packages/django/contrib/gis/geos/geometry.py

Tim Graham

unread,
Aug 3, 2018, 9:45:23 AM8/3/18
to Django users
The code you gave doesn't crash on my system, even with Django 2.0.x. Can you give a complete traceback?

Mikhailo Keda

unread,
Aug 4, 2018, 2:54:45 AM8/4/18
to Django users
I replicated this,
No traceback, python crashes with a message:
libc++abi.dylib: Pure virtual function called!

I'm assuming this is related to GDAL on macOS.
Without debug it works fine.

Environment details:
Django 2.0.7
Python 3.7.0
GDAL 1.11.5
macOS High Sierra

Saurabh Khanduja

unread,
Aug 4, 2018, 8:36:56 AM8/4/18
to Django users
Sorry, but there is no traceback. The function simply posts this message ; "pure virtual method called" in  file geometry.py it crashes on line 475
capi.destroy_geom(self.ptr)

Furthermore, for me this happens in ubuntu. I do not have access to my system till coming Tuesday, but if you need any further details, I can provide then.
Reply all
Reply to author
Forward
0 new messages