[mapserver-users] AGG vs GD rendering shows no difference
Adrian Popa
adrian_gh.popa at romtelecom.ro
Wed Jun 17 04:47:41 PDT 2009
I've managed to run mapserv through gdb, and my suspicions were
confirmed - it dies in the AGG part:
...
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xa3e000
[Thread debugging using libthread_db enabled]
[New Thread -1208244032 (LWP 18090)]
*Program received signal SIGSEGV, Segmentation fault.*
[Switching to Thread -1208244032 (LWP 18090)]
*0x00402b8c in agg::vertex_sequence<agg::vertex_dist, 6u>::add () from
/usr/lib/libagg.so.2*
(gdb) where
#0 0x00402b8c in agg::vertex_sequence<agg::vertex_dist, 6u>::add ()
from /usr/lib/libagg.so.2
#1 0x00402c2f in agg::vertex_sequence<agg::vertex_dist,
6u>::modify_last () from /usr/lib/libagg.so.2
#2 0x004050e5 in agg::vcgen_stroke::add_vertex () from /usr/lib/libagg.so.2
#3 0x080d2f4c in agg::conv_adaptor_vcgen<line_adaptor,
agg::vcgen_stroke, agg::null_markers>::vertex (this=0xbfdcdbf4,
x=0xbfdcdc98, y=0xbfdcdca0)
at
/home/adrianp/mapserver/mapserver-5.4.1/../agg-2.5/include/agg_conv_adaptor_vcgen.h:115
#4 0x080e4206 in AGGMapserverRenderer::renderPolyline<line_adaptor>
(this=0xa079968, p=@0xa081b58, color=@0xbfdcdf48, width=1,
dashstylelength=0, dashstyle=0x9c27980,
lc=agg::round_cap, lj=agg::round_join) at
/home/adrianp/mapserver/mapserver-5.4.1/../agg-2.5/include/agg_rasterizer_scanline_aa.h:206
#5 0x080ccc46 in msDrawLineSymbolAGG (symbolset=0x9c2556c,
image=0x9c4bb78, p=0xbfdce298, style=0x9c3ba18, scalefactor=1) at
mapagg.cpp:1672
#6 0x080b331d in msDrawLineSymbol (symbolset=0x9c2556c,
image=0x9c4bb78, p=0xbfdce298, style=0x9c3ba18, scalefactor=1) at
mapdraw.c:2117
#7 0x080b1d4d in msDrawShape (map=0x9c25548, layer=0x9c3ae60,
shape=0xbfdce298, image=0x9c4bb78, style=0, querymapMode=1) at
mapdraw.c:1782
#8 0x080ae1eb in msDrawVectorLayer (map=0x9c25548, layer=0x9c3ae60,
image=0x9c4bb78) at mapdraw.c:938
#9 0x080ad91d in msDrawLayer (map=0x9c25548, layer=0x9c3ae60,
image=0x9c4bb78) at mapdraw.c:743
#10 0x080acb54 in msDrawMap (map=0x9c25548, querymap=0) at mapdraw.c:441
#11 0x080584b3 in main (argc=2, argv=0xbfdcea84) at mapserv.c:1417
I'll have to check to see if there are known bugs regarding AGG...
Adrian Popa wrote:
> Thank you for your suggestion Andreas,
>
> I have run shp2img and unfortunately:
> [root at terra tmp]# shp2img -o /tmp/out.png -m
> /var/www/html/msmap/dynamicmaps/fibUaBrx.map -e "20.259999999999998
> 43.16 29.700000000000003 49.2016" -s "1250 800" -l "GranitaJudete
> Judete Urban Rural RuralSate buildings fibra fiber-common fiber-STM64
> fiber-STM16 fiber-STM4 fiber-STM1 fiber-problems-main
> fiber-problems-related fibraProblems"
> *Segmentation fault*
>
> Running the command through strace, it ends up like this:
>
> ........
> read(4, "h\376\237\224O\320;@p\225\4\25\'xG@\264d\270>^\320;@\26"...,
> 45056) = 45056
> read(4, "\303\362oU\36\206;@BY\237\354isG@\34\271\214\333\37\206"...,
> 4096) = 4096
> _llseek(9, 12288, [12288], SEEK_SET) = 0
> read(9, " "..., 4096) = 148
> _llseek(4, 1458176, [1458176], SEEK_SET) = 0
> read(4, "\25\327\377\332\27\23G@\30\256\23v9|;@\233M%\235\372\22"...,
> 24576) = 24576
> read(4, " A\1$\203\21G at .\245\211Px
> ;@\314\353\330\355\242\21G@\367"..., 4096) = 1784
> close(8) = 0
> munmap(0xb7f36000, 4096) = 0
> close(4) = 0
> munmap(0xb7f38000, 4096) = 0
> close(9) = 0
> munmap(0xb7f35000, 4096) = 0
> gettimeofday({1245157506, 462482}, NULL) = 0
> gettimeofday({1245157506, 462600}, NULL) = 0
> open("/etc/localtime", O_RDONLY) = 4
> fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0
> fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7f38000
> read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0"...,
> 4096) = 798
> close(4) = 0
> munmap(0xb7f38000, 4096) = 0
> gettimeofday({1245157506, 463468}, NULL) = 0
> gettimeofday({1245157506, 463535}, NULL) = 0
> gettimeofday({1245157506, 463599}, NULL) = 0
> gettimeofday({1245157506, 463664}, NULL) = 0
> gettimeofday({1245157506, 463734}, NULL) = 0
> gettimeofday({1245157506, 463802}, NULL) = 0
> gettimeofday({1245157506, 463866}, NULL) = 0
> gettimeofday({1245157506, 463934}, NULL) = 0
> gettimeofday({1245157506, 464028}, NULL) = 0
> *open("/var/www/html/msmap/dynamicmaps/../data/Judete.shp",
> O_RDONLY|O_LARGEFILE) = 4*
> open("/var/www/html/msmap/dynamicmaps/../data/Judete.shx",
> O_RDONLY|O_LARGEFILE) = 8
> fstat64(4, {st_mode=S_IFREG|0555, st_size=1484536, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7f38000
> *read(4*, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"...,
> 4096) = 4096
> fstat64(8, {st_mode=S_IFREG|0555, st_size=436, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7f36000
> read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 4096) = 436
> open("/var/www/html/msmap/dynamicmaps/../data/Judete.dbf",
> O_RDONLY|O_LARGEFILE) = 9
> fstat64(9, {st_mode=S_IFREG|0555, st_size=12436, ...}) = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0xb7f35000
> read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 4096) = 4096
> _llseek(9, 0, [0], SEEK_SET) = 0
> read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 4096) = 4096
> _llseek(8, 0, [0], SEEK_SET) = 0
> read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
> 4096) = 436
> read(8, "", 4096) = 0
> _llseek(4, 0, [0], SEEK_SET) = 0
> *read(4*, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"...,
> 4096) = 4096
> *read(4,*
> "\\T7 at By\233\300\226BG@\342\376\n\341\340T7@\266Mo\267\241"..., 49152)
> = 49152
> *read(4,* "]\3366@\34\21\376\224
> +G at g\245\\8\247\3356 at 6\277\213.\f"..., 4096) = 4096
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> Process 20970 detached
>
>
> I'm not sure if it faults because it can't read from file handler 4
> (Judete.shp), or if it's something else... I also tried by not
> specifying Judete in the layer list, but it still dies (while reading
> Judete.shp!).
>
> I will look further into problems with AGG (because it renders fine
> with PNG)
>
> Thank you for your help - now I know where to look.
> Regards,
> Adrian
>
> P.S. Ideas are welcome!
>
> Andreas Albarello wrote:
>>
>> On 16 Jun 2009, at 14:25, Adrian Popa wrote:
>>
>>> Hello David,
>>>
>>> I got the 500 errors from the http error log file. Unfortunately no
>>> additional information is provided.
>>> I added the MS_ERRORFILE and DEBUG statements to my map file and
>>> although the errorfile is created, I don't get any other information
>>> (neither when the map loads perfectly, nor when it dies with
>>> premature end of script headers.
>>>
>>> I read RFC 28 (http://mapserver.org/development/rfc/ms-rfc-28.html)
>>> and they specified that the server should be compiled with
>>> -DENABLE_STDERR_DEBUG, so I recompiled mapserver:
>>> CFLAGS=-DENABLE_STDERR_DEBUG ./configure --with-freetype --with-png
>>> --with-agg=../agg-2.5 --with-proj --with-ogr --with-gdal --with-xml2
>>> --with-wfs --with-wcs --with-wmsclient --with-wfsclient
>>> --with-postgis --with-threads --with-sos --with-mygis --with-geos
>>> --with-tiff
>>>
>>> I used the new binary and unfortunately nothing changed :(
>>>
>>> My (relevant part of the) mapfile looks like this:
>>>
>>> MAP
>>> CONFIG "MS_ERRORFILE" "/tmp/mapserver.log"
>>> CONFIG "MS_DEBUGLEVEL" "5"
>>> DEBUG 5 ...
>>> END
>>>
>>> What else can I try?
>>
>> Try to bypass the webserver/CGI stuff and launch shp2img directly
>> from the shell, that should hopefully yield some better output:
>>
>> shp2img -o test.png -m mapfile.map
>>
>> If you haven't already done so in your mapfile, you might need to add
>> an image size (-s 500 500) and/or an extent (-e minx miny maxx maxy)
>> to the above command line options.
>>
>> Best regards,
>> --
>> --------------------------------------------------------------------
>> Andreas Albarello
>> Analysis & SW Development
>>
>> Territorium Online srl/GmbH
>> Via Buozzi/Buozzistra�e 12 - I 39100 Bolzano/Bozen
>> email: andreas.albarello at territoriumonline.com
>> web: www.territoriumonline.com
>> --------------------------------------------------------------------
>>
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
--
---
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090617/d4b0f918/attachment.htm>
More information about the MapServer-users
mailing list