[mapserver-users] crash mapserver with some specific jpeg output and truetype symbol over raster

Oliver Christen oliver.christen at camptocamp.com
Tue Nov 15 08:14:36 EST 2011


hi all

Im experimenting some weird behavior with some jpeg output on a 
Mapserver 6.0.0

I have two layers: a raster layer and a watermark using a truetype 
symbol over it.
When requesting the jpeg output, at the very specific FORMATOPTION 
QUALITY=88, Mapserver crash with a "Floating point exception".

The image is still generated (???), but the error make it impossible to 
server the image with fastcgi, as the Mapserver error trigger an error 
500 in apache.

I DONT have any problem if:
1) I request a png image
2) I change the FORMATOPTION QUALITY=88 to 87 or 89

I have prepared a minimal testcase which allow to reproduce the problem:

http://publicshare.camptocamp.com/mapserver/testcase.zip

which can be triggered with:

shp2img -m testcase.map -l "ch.swisstopo.pixelkarte-farbe-pk200.noscale 
ch.swisstopo.watermark" -i jpeg -s 256 256 -e 624800.0 132400.0 625440.0 
133040.0 > test.jpg

or:

/usr/lib/cgi-bin/mapserv -nh 
"QUERY_STRING=map=testcase.map&mode=map&layers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermark&mapext=624800.0+132400.0+625440.0+133040.0&mapsize=256+256" 
 > test2.jpeg

I just had a look using gdb (but I dont have enough knowledge to get any 
info from this sadely):

gdb /usr/lib/cgi-bin/mapserv
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib/cgi-bin/mapserv...(no debugging symbols 
found)...done.
(gdb) run -nh 
"QUERY_STRING=map=testcase.map&mode=map&layers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermark&mapext=624800.0+132400.0+625440.0+133040.0&mapsize=256+256" 
 > test2.jpeg
Starting program: /usr/lib/cgi-bin/mapserv -nh 
"QUERY_STRING=map=testcase.map&mode=map&layers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermark&mapext=624800.0+132400.0+625440.0+133040.0&mapsize=256+256" 
 > test20.jpeg
[Thread debugging using libthread_db enabled]

Program received signal SIGFPE, Arithmetic exception.
0x00000000004e20dd in ?? ()
(gdb) backtrace
#0 0x00000000004e20dd in ?? ()
#1 0x000000000051401e in jpeg_stream_term_destination ()
#2 0x00007ffff74dac6f in jpeg_finish_compress () from /usr/lib/libjpeg.so.62
#3 0x00000000005144af in ?? ()
#4 0x00000000005168ea in ?? ()
#5 0x0000000000454fbf in ?? ()
#6 0x000000000041e1bb in main ()

I had a look at Mapserver 6.0.1 changelog but I couldnt find a bug which 
may be similar.
Is this a known issue?
Could someone tell me if it is "enough" to open a bug?

Thanks in advance
best regards
Oliver


More information about the mapserver-users mailing list