[postgis-tickets] [PostGIS] #2950: ST_ClipByBox2D crashes backend (was: Make ST_ClipByBox2D interruptible)

PostGIS trac at osgeo.org
Wed Oct 1 15:50:38 PDT 2014


#2950: ST_ClipByBox2D crashes backend
---------------------+------------------------------------------------------
 Reporter:  strk     |       Owner:  strk         
     Type:  defect   |      Status:  assigned     
 Priority:  blocker  |   Milestone:  PostGIS 2.2.0
Component:  postgis  |     Version:  trunk        
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by strk):

 It actually seems to be a postgis issue, in that copying the offending
 input and using it as a literal fixes the problem, so it must have to do
 with memory management inside postgis.

 The working query is:

 SELECT
 ST_ClipByBox2d('0103000020110F00000100000008000000AA2120B4A7FB1241ECF43DA6E035524154CA0AA7A2FB1241E021BA67DD35524103868A5979FB1241A20C161ADC355241B9B52D4A3BFB12411890EA10DD3552416F3B80D811FB12418D1BAAA7DF355241C9C8206726FB1241C867BFE6E235524174D4D4B76EFB12415A4A8635E4355241AA2120B4A7FB1241ECF43DA6E0355241',
 'BOX(-2661231.576776697 2348145.508920613,156543.033928043
 5165920.119625353)'::box2d);

 But if the geometry is retrived from a table, then it doesn't work
 anymore:

 {{{
 create table test (g geometry);
 insert into test values
 ('0103000020110F00000100000008000000AA2120B4A7FB1241ECF43DA6E035524154CA0AA7A2FB1241E021BA67DD35524103868A5979FB1241A20C161ADC355241B9B52D4A3BFB12411890EA10DD3552416F3B80D811FB12418D1BAAA7DF355241C9C8206726FB1241C867BFE6E235524174D4D4B76EFB12415A4A8635E4355241AA2120B4A7FB1241ECF43DA6E0355241');
 SELECT ST_ClipByBox2d(g, 'BOX(-2661231.576776697
 2348145.508920613,156543.033928043 5165920.119625353)'::box2d) from test;
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2950#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list