[postgis-devel] [PostGIS] #1308: ST_DumpAsPolygons breaks in debug mode

PostGIS trac at osgeo.org
Fri Nov 18 06:41:13 PST 2011


#1308: ST_DumpAsPolygons breaks in debug mode
----------------------------+-----------------------------------------------
 Reporter:  dzwarg          |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------
 When compiled with the flags:
 {{{
 #!sh
 --with-raster --enable-debug CFLAGS="-g -O0"
 }}}

 And performing this query (ST_Sum definition can be found in
 [source:trunk/raster/test/regress/rt_mapalgebrafctngb.sql]):
 {{{
 #!sql
 SELECT
   ST_Area(geom)
  FROM (SELECT
     (ST_DumpAsPolygons(
       ST_MapAlgebraFctNgb(rast, 1, NULL, 1, 1, 'ST_Sum(float[][], text,
 text[])'::regprocedure, 'NULL', NULL)
     )).*
    FROM ST_TestRaster(5, 5, 1) AS rast) AS foo;
 }}}

 ST_DumpAsPolygons causes a segfault on line 851:
 {{{
 #!c
 POSTGIS_RT_DEBUGF(4, "Result %d, Polygon %s", call_cntr,
 geomval2[call_cntr].geom);
 POSTGIS_RT_DEBUGF(4, "Result %d, val %s", call_cntr,
 geomval2[call_cntr].val);
 POSTGIS_RT_DEBUGF(4, "Result %d, val %s", call_cntr,
 geomval2[call_cntr].srid); // <-- this line
 }}}

 Even when setting the SRID manually on rast, the behavior does not change.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1308>
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-devel mailing list