[Mapserver-users] mapserver crashes at a png file

Vincent Schut schut at sarvision.com
Wed Jun 25 08:20:51 PDT 2003


Carsten,

sorry this is gonna be a very short answer cause I got to go home.
layers: see the mapserver cgi pages in the documentation on the website. It 
will be somthing like 'layer=name&layer=name2&...' I think.
About the tiff thing: why would tiff work only with grayscale? Tiff's can be 
rgb, anything you want.
About png not working: have you updated/recompiled something (notably a 
library like gd, libpng or gdal) after compiling mapserver? Then you will 
have to recompile mapserver.
I assume you compiled mapserver etc. yourself. It might help if we knew the 
configure options you used for compiling mapserver AND for gdal also. There 
might be a clue in that... Otherwise, I really don't know.

sorry have to go now.

Cheers,
Vincent.


On Wednesday 25 June 2003 18:53, Carsten Busch wrote:
> Hello Vincent,
> thank you for your answer.
>
> Vincent Schut wrote:
> > Carsten,
> >
> > first about the output: that is not only the png image, but also the
> > headers as a browser would expect them. You cannot save the output as a
> > png file. But you can issue the same command in your browser by typing
> > (in the adress field of the browser):
> > http://localhost/cgi-bin/mapserv?map=/bla/bla/map.map&mode=map
> > Then you should see the generated png image.
>
> Please again, where do I define the selected layers?
> Does it mean, that all possible layers of the map file are selected?
>
> > About your png error: have you tried to open the png layer file with an
> > image viewer? Just to be sure that the png file is not corrupt...
>
> It is not corrupt.
>
> > If you can view the file, you could convert it to tiff and check if
> > mapserver can display it if you define your layer to have the tiff file
> > as input. This would track the problem down to png reading (e.g. libgd or
> > libgdal or libpng).
>
> Ok, if I use a tiff, mapserver works. So, I could convert all raster
> Layer in the tiff format, but it will work only with grayscale raster data.
>
> > Btw, after running in gdb and the segfault, did you type 'backtrace'?
> > This gives us some more hints to where the crash appeared.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x08072d72 in drawPNG ()
> (gdb) backtrace
> #0  0x08072d72 in drawPNG ()
> #1  0x0807488e in msDrawRasterLayer ()
> #2  0x080645bb in msDrawLayer ()
> #3  0x08061131 in msDrawMap ()
> #4  0x080556c4 in msGenerateImages ()
> #5  0x0804ea7b in main ()
> #6  0x402927f7 in __libc_start_main () from /lib/i686/libc.so.6
> (gdb)
>
> Thank you for your help.
>
> > Cheers,
> > Vincent.
> >
> > On Tuesday 24 June 2003 19:23, Carsten Busch wrote:
> >>Hello,
> >>
> >>I found the right parameter for testing:
> >>(gdb) run
> >>"QUERY_STRING=map=/usr/local/apache/htdocs/itasca/demo.map&layer=thuering
> >>en " Starting program: /usr/local/apache/cgi-bin/mapserv
> >>"QUERY_STRING=map=/usr/local/apache/htdocs/itasca/demo.map&layer=thuering
> >>en "
> >>
> >>Program received signal SIGSEGV, Segmentation fault.
> >>0x08072d72 in drawPNG ()
> >>
> >>lyer=thueringen, is the png layer, If I use any other (right) layer of
> >>the postgis db, Iget the png image.
> >>
> >>Any idea?
> >>
> >>
> >>Carsten

-- 
______________________________________
Vincent Schut
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com



More information about the MapServer-users mailing list