Opened 15 years ago

Last modified 15 years ago

#80 closed defect (fixed)

ST_Multi seg faults

Reported by: kneufeld Owned by: kneufeld
Priority: critical Milestone: PostGIS 1.3.6
Component: postgis Version: 1.3.X
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. SELECT ST_Multi('MULTILINESTRING((0 0,1 1))');

What is the expected output? multi


01050000000100000001020000000200000000000000000000000000000000000000000000000000F03F000000000000F03F

(1 row)

What do you see instead? 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: Failed.

What version of the product are you using? On what operating system? PostgreSQL 8.3.5, POSTGIS='1.4.0SVN'

Apparently the same happens for 1.3.4

Change History (7)

comment:1 by mcayland, 15 years ago

Hmmmm. I get this on 1.4.0SVN (x86_64):

postgis=# SELECT ST_Multi('MULTILINESTRING((0 0,1 1))'); ERROR: Dimensions mismatch in lwcurve

Looks similar to the error message that was reported by William Kyngesburye when trying to clean geometries…

ATB,

Mark.

comment:2 by robe, 15 years ago

I think I found the smoking gun. Shouldn't lwgeom_contains_subgeoms have a line for MULTILINETYPE? — take a look at lwgeom_dump.c around line 56.

comment:3 by mcayland, 15 years ago

Good spot Regina! For some reason, this doesn't segfault on my machine but just returns a slightly wrong answer?! Anyway, the fix looks good.

ATB,

Mark.

comment:4 by robe, 15 years ago

I tested the patch on 1.3 but I'm still getting my system back to 1.4 so haven't tested the 1.4 patch. If you can confirm the 1.4 patch works, that will be great.

comment:5 by mcayland, 15 years ago

Hi Regina,

Looks good to me on both 1.3 branch and trunk.

ATB,

Mark.

comment:6 by mcayland, 15 years ago

Kevin,

Are you happy for this to be marked as Fixed?

ATB,

Mark.

comment:7 by kneufeld, 15 years ago

Yes, the fix works for me now as well.

Great work, Kevin

Note: See TracTickets for help on using tickets.