Opened 14 years ago

Closed 14 years ago

#571 closed defect (fixed)

TRIANGLE and TIN fails crash me test

Reported by: robe Owned by: colivier
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

Haven't had a chance to test on other platforms but the below crashes the server process consistently. Requiring a service restart. This is tested with latest PostGIS 2.0 trunk on PostgreSQL 9.0 beta 4 32-bit XP.

SELECT ST_Affine(ST_GeomFromEWKT(
'TRIANGLE ((
                0 0, 
                0 9, 
                9 0, 
                0 0
            ))') , 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5);

Change History (4)

comment:1 by robe, 14 years ago

Owner: changed from pramsey to colivier

comment:2 by colivier, 14 years ago

Resolution: fixed
Status: newclosed

Regina,

Thanks for the report ! Commited a fix as r5842

Result look good:

foo=# SELECT ST_AsEWKT(ST_Affine(ST_GeomFromEWKT(                                                                              'TRIANGLE ((                                                                                                                                   0 0,                                                                                                                           0 9,                                                                                                                           9 0,                                                                                                                           0 0                                                                                                                        ))') , 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5));
              st_asewkt              
-------------------------------------
 TRIANGLE((0.5 0.5,5 5,5 5,0.5 0.5))
(1 row)

foo=# SELECT ST_AsEWKT(ST_Affine(ST_GeomFromEWKT(                                                                              'POLYGON ((                                                                                                                                    0 0,                                                                                                                           0 9,                                                                                                                           9 0,                                                                                                                           0 0                                                                                                                        ))') , 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5));
             st_asewkt              
------------------------------------
 POLYGON((0.5 0.5,5 5,5 5,0.5 0.5))

comment:3 by robe, 14 years ago

Resolution: fixed
Status: closedreopened
Summary: TRIANGLE fails crash me testTRIANGLE and TIN fails crash me test

More hotspots

SELECT ST_Boundary(ST_GeomFromEWKT(
'TRIANGLE ((
                0 0, 
                0 9, 
                9 0, 
                0 0
            ))') ;

SELECT ST_IsValid(ST_GeomFromEWKT(
'TRIANGLE ((
                0 0, 
                0 9, 
                9 0, 
                0 0
            ))') );

SELECT ST_IsValid(ST_GeomFromEWKT('TIN (((
                0 0 0, 
                0 0 1, 
                0 1 0, 
                0 0 0
            )), ((
                0 0 0, 
                0 1 0, 
                1 1 0, 
                0 0 0
            ))
            )') );

I suspect pretty much any GEOS function will crash the server when confronted with TRIANGLE or TIN.

Probably related to #570.

comment:4 by colivier, 14 years ago

Resolution: fixed
Status: reopenedclosed

Yes Regina your assumption was right, any GEOS functions produced a crash !

It should now be fixed for TRIANGLE, TIN and POLYHEDRALSURFACE as r5845.

Produce now an 'user friendly': unsupported geometry !

I closed this one as we already've got #570.

Note: See TracTickets for help on using tickets.