[Mapserver-users] why a segfault with mapserv but shp2img works fine?

Sean Gillies sgillies at frii.com
Thu Jan 30 16:14:46 PST 2003


On Thursday, January 30, 2003, at 04:58  PM, Daniel Morissette wrote:

> Sean Gillies wrote:
>>
>> I've built mapserv and shp2img from a very recent CVS checkout.  While
>> testing, I've found that shp2img works fine with my map file.  
>> However,
>> when testing mapserv from the shell using the REQUEST_METHOD and
>> QUERY_STRING environmental variables (same map file), I get a
>> segmentation fault.  My map has a single raster layer, a GeoTIFF that
>> I'm accessing with GDAL.
>>
>> Can anyone briefly summarize the differences in the way shp2img and
>> mapserv work, and why the latter might be more prone to a segfault?
>>
>
> Well, mapserv does all sorts of things that shp2img doesn't worry
> about.  Think about all the template stuff (were you using mode=map or
> the default mode=browse ?), the QUERY_STRING parsing, turning layers on
> and off, temporary image files creation for elements found in the
> template, etc.
>
> A crash is always an important thing to fix IMO.  If you can get a 
> stack
> dump in GDB after the crash and provide more details to reproduce it
> then please file a bug in bugzilla with all that information.
>
> BTW, there is a (undocumented) way to test with mapserv at the
> command-line without having to set the QUERY_STRING and REQUEST_METHOD
> env. vars.  You can use this:
>
>   ./mapserv "QUERY_STRING=map=/path/to/mymap.map&mode=map&..."
>
> Daniel
> -- 

The problem was in the web block of my map file.  Doh!  Thanks for the
suggestions.  Cheers,
S.




More information about the MapServer-users mailing list