[postgis-devel] use of palloc() crashes server
Christoph Spoerri
cspoerri at cavtel.net
Wed May 12 20:17:42 PDT 2004
Hi there,
I'm working on a couple new function for PostGIS (dyn. segmentation/linear
referencing system). I ran now into the problem where postgresql crashes when
I'm calling line_make(). I traced it down to the palloc() call within the
line_make() function, but I have no idea what could cause the error.
The line I'm creating has around 370 points, and the lines where the code
crashes is:
result= (LINE3D *) palloc (*size); (in file: postgis_inout.c)
And just to make the problem more confusing:
I run the following query (after logging in):
select lrs_getshape(wkb_geometry, 1, 80) from test;
=> code crashes
yet, if I run the following sequence:
select lrs_getshape(wkb_geometry, 1, 20) from test;
select lrs_getshape(wkb_geometry, 1, 80) from test;
=> code doesn't crash (????)
It crashes again if I run the following sequence:
select lrs_getshape(wkb_geometry, 1, 20) from test;
select lrs_getshape(wkb_geometry, 1, 80) from test;
select lrs_getshape(wkb_geometry, 1, 90) from test;
Note: lrs_getshape() accumulates the necessary points to create a new 3D line.
Any idea what could cause this? And thanks for your help,
Christoph
More information about the postgis-devel
mailing list