artemp/mapnik — Issue #341: segfault in mapnik::wkb_reader::read_double under read_polygon
Author: artemp
Created: 2011-10-11 16:12:57+00:00
State: open
Labels: PostGIS_Input_Driver

mapnik seems to be segfaulting in read_double.
This seems to happen anytime I try to read from planet_osm_poloygons

It seems that read_polygon() num_points is showing corrupt data

(gdb) p num_points
$1 = -1068264195

{{{
(gdb) where
#0 0xb72ac507 in mapnik::wkb_reader::read_double (this=0xbfa5e384) at src/wkb.cpp:190
#1 0xb72acbe1 in mapnik::wkb_reader::read_coords (this=0xbfa5e384, ar=@0xbfa5e2f8) at src/wkb.cpp:210
#2 0xb72ace84 in mapnik::wkb_reader::read_polygon (this=0xbfa5e384, feature=@0x84c9da8) at src/wkb.cpp:307
#3 0xb72ad501 in mapnik::wkb_reader::read (this=0xbfa5e384, feature=@0x84c9da8) at src/wkb.cpp:129
#4 0xb72abf08 in mapnik::geometry_utils::from_wkb (feature=@0x84c9da8, wkb=0x85aaa4c "", size=2909,
multiple_geometries=false, format=mapnik::wkbGeneric) at src/wkb.cpp:367
#5 0xb5903604 in postgis_featureset::next () from /usr/local/mapnik/lib/mapnik/input/postgis.input
warning: (Internal error: pc 0xb7a52c0b in read in psymtab, but not in symtab.)
#6 0xb7a52c0c in mapnik::feature_style_processor >::apply_to_layer (this=warning: (Internal error: pc 0xb7a52c0b in read in psymtab, but not in symtab.)

}}}

The layer being rendered is from postgis generated with osm2pgsql with the -l option (latlong).

leisure

postgis
x
x
x
geodata
(select * from planet_osm_polygon order by z_order,way_area desc) as leisure
false
-180,-90,180,90

I see this with svn r1144

None polygon layers seem to work fine, but any polygon layer I try has this issue.