Opened 18 years ago

Last modified 15 years ago

#83 closed defect (fixed)

SWIG bindings segmentation fault

Reported by: cfis@… Owned by: strk@…
Priority: major Milestone:
Component: SWIG Version: 2.2.2
Severity: Significant Keywords: imported, phpbugtracker
Cc: mloskot

Description (last modified by mloskot)

The Geos 2.2.1 SWIG bindings don't deal with memory management very well. If you try to run the equivalent of example.cpp in Python you will get segmentation faults. I've sent a patch to the geos mailing list that solve the problem.

Attachments (3)

cfis_swig.3.patch (13.0 KB ) - added by cfis@… 18 years ago.
SWIG patch for 2.2.2
ruby.3.zip (103.4 KB ) - added by cfis@… 18 years ago.
New Ruby bindings
python.3.i (179 bytes ) - added by cfis@… 18 years ago.
Python Swig file

Download all attachments as: .zip

Change History (8)

by cfis@…, 18 years ago

Attachment: cfis_swig.3.patch added

SWIG patch for 2.2.2

by cfis@…, 18 years ago

Attachment: ruby.3.zip added

New Ruby bindings

by cfis@…, 18 years ago

Attachment: python.3.i added

Python Swig file

comment:1 by cfis@…, 18 years ago

Patches:
 
cfis_swig.patch - Apply normally
ruby.zip - unzip under geos/swig
python.i - put in geos/swig/python

What these files do:

* Updates memory handling, you can now run the equivalent of example.cpp
in python / ruby without causing segmentation faults

* Updates methods like WKBReader.read so that they return the
appropriate geometry type (point, line, etc.) as opposed to
Geos::Geometry.

* Limits the exposed api.  Only exposes geom.h, version.h, util.h, io.h

* Exposes WKBReader.read/write and WKTReader.read/write and WKBWriter.read/write and WKTWriter.read/write which were not previously available from scripting languages

* Adds Ruby support, with test cases


comment:2 by strk@…, 18 years ago

Resolution: nonefixed
Applied to the 2.2 branch, with Makefile.am
modified to not attempt automatic build.

comment:17 by mloskot, 16 years ago

Cc: mloskot added
Description: modified (diff)
Milestone: imported2.2.2

comment:18 by mloskot, 16 years ago

Priority: 3major

comment:19 by (none), 15 years ago

Milestone: 2.2.2

Milestone 2.2.2 deleted

Note: See TracTickets for help on using tickets.