[mapserver-users] 5.2 AGG and PHP mapscript problem - possible build issue?
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jul 7 09:41:18 PDT 2008
Hi all,
I could really use some help on this one. This runs for some areas of
the map but will segv for others which implies that the trigger is
data/mapfile related, although this might be the root issue. I did fine
a suspect warning during the compile of mapscript, see below, but not
sure what to make of it or why it is happening.
The problem I am running into is that php/mapscript is crashing from
what appears to be infinite recursion in an AGG function.
gdb /home/steve/bin/php
run precache-dbg.php -s=50000 -e=-17.8,10.0,65.0,39.8 -m=map2_en -r=42,43
...
vertIndex=42, horizIndex=271
metaTop=-187432, metaLeft=302552, szMetaTileId=t-187392/l302592
szMetaDir=/u/data/ayna-world/map2_en/50000/__base__/def/t-187392/l302592/meta
Going to call map->draw
QUERY_STRING='mode=map&map=/u/data/maps/en/ayna-master.map&mapext=48.026827464+29.4962617073+48.2833498244+29.7527840677&imgsize=1616+1616&layers=all&map.imagetype=agg/png24&map.debug=5'
>junk.png
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208305984 (LWP 6886)]
agg::rasterizer_cells_aa<agg::cell_aa>::line (this=0x98c986c,
x1=-2147483648, y1=-129,
x2=715827882, y2=-129)
at
/u/tools/work/mapserver-5.2.0-beta2/../agg-2.4/include/agg_rasterizer_cells_aa.h:316
316 void rasterizer_cells_aa<Cell>::line(int x1, int y1, int x2,
int y2)
Current language: auto; currently c++
(gdb) bt
#0 agg::rasterizer_cells_aa<agg::cell_aa>::line (this=0x98c986c,
x1=-2147483648,
y1=-129, x2=715827882, y2=-129)
at
/u/tools/work/mapserver-5.2.0-beta2/../agg-2.4/include/agg_rasterizer_cells_aa.h:316
#1 0x0020f4ee in agg::rasterizer_cells_aa<agg::cell_aa>::line
(this=0x98c986c,
x1=-2147483648, y1=-129, x2=-715827883, y2=-129)
at
/u/tools/work/mapserver-5.2.0-beta2/../agg-2.4/include/agg_rasterizer_cells_aa.h:326
#2 0x0020f4ee in agg::rasterizer_cells_aa<agg::cell_aa>::line
(this=0x98c986c,
x1=-2147483648, y1=-129, x2=715827882, y2=-129)
at
/u/tools/work/mapserver-5.2.0-beta2/../agg-2.4/include/agg_rasterizer_cells_aa.h:326
#3 0x0020f4ee in agg::rasterizer_cells_aa<agg::cell_aa>::line
(this=0x98c986c,
x1=-2147483648, y1=-129, x2=-715827883, y2=-129)
at
/u/tools/work/mapserver-5.2.0-beta2/../agg-2.4/include/agg_rasterizer_cells_aa.h:326
and this goes on forever as far as I can tell.
If I run the same image via:
./mapserv
QUERY_STRING='mode=map&map=/u/data/maps/en/ayna-master.map&mapext=48.026827464+29.4962617073+48.2833498244+29.7527840677&ingsize=1616+1616&layers=all&map.imagetype=agg/png24&map.debug=5'
>junk.png
It exits normally with a segv.
The system is Linux centos, it is a clean build on a i386 cpu.
./configure --enable-force-cgi-redirect --with-regex=system
-with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib=/usr
--with-freetype-dir=/usr --enable-gd-native-ttf --without-xpm
--disable-xml --without-pear --with-pcre-dir=/usr
--with-config-file-path=/u/tools/lib
I get the same error with 5.2-beta2 and 5.2-beta4 building:
# for mapserv-5.2-beta2 using:
./configure \
--enable-ignore-missing-data \
--with-httpd=/usr/sbin/httpd \
--with-proj=/usr \
--with-agg=../agg-2.4 \
--with-gd \
--with-png=/usr \
--with-freetype \
--with-postgis \
--without-tiff \
--with-wmsclient \
--with-php=../php-4.4.8 \
--with-fribidi-config=yes \
--with-gdal \
--with-wfs \
--with-ogr \
--enable-debug
#for mapserv-5.2-beta4 using:
./configure \
--enable-ignore-missing-data \
--with-httpd=/usr/sbin/httpd \
--with-proj=/usr \
--with-agg=../agg-2.4 \
--with-gd \
--with-png=/usr \
--with-freetype \
--with-postgis \
--without-tiff \
--with-wmsclient \
--with-php=../php-4.4.8 \
--with-fribidi-config=/usr/local/lib/pkgconfig/fribidi.pc \
--with-gdal \
--with-wfs \
--with-ogr \
--enable-debug
I also just noticed the following warning during the compile:
gcc -fPIC -g -O2 -fPIC -Wall -DCOMPILE_DL=1 -DPHP4
-DNEED_NONBLOCKING_STDERR -DUSE_FRIBIDI -DUSE_FRIBIDI2 -DUSE_WMS_LYR
-DUSE_CURL -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_POSTGIS -DUSE_GDAL
-DUSE_OGR -DUSE_PROJ -DUSE_EPPL -DUSE_AGG -DUSE_GD_GIF -DUSE_GD_PNG
-DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW
-DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB
-I/u/tools/work/mapserver-5.2.0-beta4 -I/usr/local/include/fribidi
-I/usr/include -I/usr/include -I/usr/include
-I/u/tools/work/mapserver-5.2.0-beta4/../agg-2.4/include
-I/u/tools/work/mapserver-5.2.0-beta4/../agg-2.4/font_freetype
-I/usr/include/freetype2 -I/usr/include
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/dl
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/main
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/Zend
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/include
-I/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/TSRM -c -o
php_mapscript.o php_mapscript.c
In file included from
/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/Zend/zend_config.h:1,
from
/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/Zend/zend.h:51,
from
/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/main/php.h:34,
from php_mapscript_util.h:33,
from php_mapscript.c:32:
/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/main/../main/php_config.h:111:1:
warning: "SIZEOF_LONG" redefined
In file included from /usr/include/cpl_port.h:86,
from /usr/include/ogr_core.h:33,
from /usr/include/ogr_api.h:42,
from /u/tools/work/mapserver-5.2.0-beta4/mapserver.h:108,
from /u/tools/work/mapserver-5.2.0-beta4/maptemplate.h:33,
from php_mapscript.h:54,
from php_mapscript.c:31:
/usr/include/cpl_config.h:166:1: warning: this is the location of the
previous definition
[root at map01 mapserver-5.2.0-beta4]# grep SIZEOF_LONG
/u/tools/work/mapserver-5.2.0-beta4/../php-4.4.8/main/../main/php_config.h
#define SIZEOF_LONG 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF_LONG_LONG_INT 8
[root at map01 mapserver-5.2.0-beta4]# grep SIZEOF_LONG
/usr/include/cpl_config.h #define SIZEOF_LONG 4
This seems problematic, any thoughts on this or the other stuff?
Thanks,
-Steve W
More information about the MapServer-users
mailing list