Opened 16 years ago

Last modified 16 years ago

#69 closed task (fixed)

ST_Translate crashes when fed circular string

Reported by: robe Owned by: robe
Priority: medium Milestone:
Component: postgis Version:
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. SELECT ST_Translate(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227

150505,220227 150406)'),1,2);

WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

The connection to the server was lost. Attempting reset: Succeeded.

I apologize if these reports are getting annoying. But figured I'd document them as I come across them

2) happens on 1.3.4 SVN and 1.3.3

Change History (5)

comment:1 by mcayland, 16 years ago

I suspect this is similar to the ST_Dump() issue: the affine functions are trying to recurse on a geometry that that isn't a type that can contain subgeometries. Unfortunately I've run out of time for this one today…

ATB,

Mark.

comment:2 by robe, 16 years ago

Mark,

I've been looking at this one too and I fear this one may be a tad bit more complicated so maybe the best we can do is throw an error for 1.3.4 to prevent the function from crashing and revisit in 1.4. There are a couple of areas that may be the culprit starting in the lwgeom_affine_recursive in lwgeom_functions_basic.c

1) There is an assumption here that all geometries can be broken down to LWPOINTS, LWLINES, LWPOLYS. In the case of curve - I think we would need to add LWCURVE, LWCURVEPOLY to the mix.

2) The fact that it crashes and doesn't just return a null leads me to believe one of the lwgeom_*_inspected is doing something funky with CURVE types.

So I guess the good news is that if we fix these dependency functions, it will probably fix a whole class of non-GEOS PostGIS functions that don't currently work with CURVES.

To Paul or the other Mark (Leslie),

I recall Paul saying Mark Leslie is working on curve support fixes. Does that include fixing Affine or the aforementioned dependency functions? Don't want to step on anyone's toes when I come across these things that don't work if they are already work in progress.

Anyrate maybe I'll test some more functions with curved geometries - and come back to this one and maybe get a better idea of the class of functions that don't work with curves to better find the smoking guns.

Thanks, Regina

comment:3 by mcayland, 16 years ago

Should now be fixed in 1.3 branch and HEAD. Please test :)

ATB,

Mark.

comment:4 by robe, 16 years ago

Works for me. Also tried with a simple collection and seems to work

comment:5 by robe, 16 years ago

Forgot I have yet to try with the other affine functions but I assume they should work. I'll try those in the next couple of days.

Note: See TracTickets for help on using tickets.