[mapserver-dev] Offset x -99 AGG crash
Torsten Weber
TWeber at traffic-consult.de
Mon Nov 24 09:47:05 EST 2008
Hi all,
I don't know, if this is the correct way to report this.
Mapserver runs on a segfault in the following very special case using the agg
renderer (GD Renderer works).
Possibly this stands in context with #2732 and #2659 (discussed
fixes/modifications are applied):
We have a line layer which has some lines with only two points at the same
location. (not really meaningful, I know) Normal rendering works, rendering
with "OFFSET x -99" crashes.
I had a look at the source and found a simple solution. There is a Query at
maputils.c at line 1493 (from the 5.2 final source) to ignore duplicate
points. In this special case it reduces the line to one point and mapserver
crashes.
I've changed the line from
if (dx==0) {
if (dy==0) {
continue;
}
....
to
if (dx==0) {
if (dy==0 && first==0) {
continue;
}
...
so only duplicated points in the middle of a line are ignored and the chrash
disappears. Tested with shp2img and php_mapscript.
Our Environment:
SuSE Linux 10.3 with kernel 2.6.22.18 64bit
Intel Quadcore
4GB RAM
MapServer version 5.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS
INPUT=TIFF INPUT=EPPL7 INPUT=ORACLESPATIAL INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE
Regards,
Torsten Weber
--
--------------------------------------------------------------------
Traffic Consult GmbH
Herzbachweg 65
63571 Gelnhausen
Tel: +49(0)6051 / 82889 - 15
Mobile: +49(0)179 / 5340731
Fax: +49(0)6051/82889 - 29
E-Mail: TWeber at traffic-consult.de
WWW: http://www.traffic-consult.de
Geschäftsführer: Dr. Dieter Alfers
Amtsgericht Hanau, HRB 12285
--------------------------------------------------------------------
More information about the mapserver-dev
mailing list