[postgis-devel] C-Library function returning PostGIS point crashing backend

Paul Ramsey pramsey at opengeo.org
Thu Jan 10 08:18:23 PST 2013


Nothing jumps out at me. This is your big chance to also learn how to
put the backend into gdb! You can either try and attach to a running
pid, or do as I do and shut down the server, and run gdb on the
backend in single user mode

you'll need to make sure that the PGDATA env variable points to your
data directory
then you can go

# gdb postgres

gdb> run --single yourdbname

backend> select yourfunction();

On Thu, Jan 10, 2013 at 7:57 AM, David Fuhry <dfuhry at gmail.com> wrote:
> Hi,
>
>    I'm trying to write a C-Library function to return a PostGIS point. It's
> crashing the backend when called:
>
> => select test2();
> The connection to the server was lost. Attempting reset: Failed.
>
>    Minimal Makefile, .c, and .sql files are attached. Any suggestions on
> what I might be doing wrong? I tried to mimic existing functions found in
> PostGIS, examples at
> http://trac.osgeo.org/postgis/wiki/DevWikiPostGISCoding, and other code I
> found like the KM_ToLLA function at
> https://github.com/kmatzen/PG_LLA_ECEF/blob/master/pg_lla_ecef.c.
>
> => select version();
> PostgreSQL 9.2.1 on x86_64-unknown-linux-gnu, compiled by gcc (Debian
> 4.4.5-8) 4.4.5, 64-bit
>
> => select postgis_full_version();
> POSTGIS="2.0.1SVN r9750" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23
> September 2009" LIBXML="2.7.8" LIBJSON="UNKNOWN"
>
> (PostGIS raster and topology are not installed.)
>
> Thanks,
>
> Dave
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list