Ticket #571 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

TRIANGLE and TIN fails crash me test

Reported by: robe Owned by: colivier
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
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

Changed 3 years ago by robe

  • owner changed from pramsey to colivier

Changed 3 years ago by colivier

  • status changed from new to closed
  • resolution set to fixed

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))

Changed 3 years ago by robe

  • status changed from closed to reopened
  • resolution fixed deleted
  • summary changed from TRIANGLE fails crash me test to TRIANGLE 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.

Changed 3 years ago by colivier

  • status changed from reopened to closed
  • resolution set to fixed

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.