[Mapserver-users] shp2Img Segmentation Fault error with ArcSD E layer (mapserv Query )

Fawcett, David David.Fawcett at state.mn.us
Tue Oct 14 12:10:47 PDT 2003


The shpdump.exe utility will also give you extents.

David.

> ----------
> From: 	Pryor, Clayton J[SMTP:CJPRYOR at sandia.gov]
> Sent: 	Tuesday, October 14, 2003 12:03 PM
> To: 	'mapserver-users at lists.gis.umn.edu'
> Cc: 	InSIST
> Subject: 	[Mapserver-users] shp2Img Segmentation Fault error with ArcSDE layer (mapserv Query )
> 
> 
> Hi all,
> 
> Well, I'm making progress with building a version of the default demo app
> using my layers in ArcSDE.  However, I have run into another problem that I
> can not seem to find the answer to.
> 
> It has been described in the archives before but the thread in the archives
> took a different branch than mine.  I have not been able to find out how to
> resolve the branch that my problem has taken.
> 
> 
> System Configuration:
> ---------------------
> 
> Machine:  IBM ThinkPad A31
> Operating System: Linux Red Hat 9
> Web Server: Apache (httpd-2.0.47)
> PHP: 4.3.3 configured for CGI
> GD: 2.0.15
> PROJ: 4.4.7
> Mapserver: 4.0
> ArcSDEClient: 8.3
> 
> Mapserver Configuration: ./configure --with-sde=/usr/local/arcsde/sdeexe83
> --with-sde-version=83 --with-gd=/usr/local --with-php=/usr/local/php-4.3.3
> --with-proj=/usr/local
> 
> 
> Problem Description:
> --------------------
> 
> When trying to do a query from my web page against a layer based on a shape
> file that came with the demo app the query works fine.   When trying to do a
> query from my web page against a layer based on ArcSDE (Oracle) I get the
> generic "Internal Server Error" message.  I believe everything is properly
> duplicated in my demo.map file and my html files so that the ArcSDE based
> query is the same as the shapefile based query.
> 
> In reviewing the apache server logs I see the "Premature end of script
> headers" message.
> 
> 
> Command Line Results:
> ---------------------
> 
> When I enter the mapserv call from the command line I get html for a web
> page followed by a line that reads:  "Segmentation fault".  
> 
> Here is the actual command that I enter in the "htdocs/demoSNL3" directory
> (which contains my application):
> 
> ../../cgi-bin/mapserv 
> QUERY_STRING="map=%2Fusr%2Flocal%2Fapache2%2Fhtdocs%2FdemoSNL3
> %2Fdemo.map&layer=usboundaries&zoomsize=2&program=%2Fcgi-bin
> %2Fmapserv&map_web_imagepath=%2Fusr%2Flocal%2Fapache
> 2%2Fhtdocs%2Ftmp%2F&map_web_imageurl=%2Ftmp%2F"
> 
> Here are the actual results that I get back:
> 
> Content-type: text/html
> 
> <!-- MapServer version 4.0 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
> SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG
> INPUT=SDE INPUT=SHAPEFILE -->
> <html>
> <head><title>MapServer SNL3 Demo Interface</title></head>
> <body bgcolor=#FFFFFF>
> 
> <center><h1>MapServer SNL3 Demo Interface</h1></center>
> <hr>
> <form method=GET action="/cgi-bin/mapserv">
> 
> <center>
> <table border=0 cellspacing=0 cellpadding=4 bgcolor="#000000">
> <tr>
> <td valign="top" align=center>
>   <table cellpadding="0" cellspacing="0" border="0">
>     <tr><td colspan="2"><INPUT NAME="img" TYPE="image"
> SRC="/tmp/DEMO106614390932750.png" width=600 height=600 border=0></td></tr>
>     <tr>
>       <td> <font size=-1 face="arial,helvetica"
> color="#FFFFFF"><b>Powered by MapServer</b></font></td>
>       <td align="right"><img src="/tmp/DEMOsb106614390932750.png"></td>
>     </tr>
>   </table>
> </td>
> <td valign="top" bgcolor=#ffffff>
>   <table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff">
>     <tr><td>
>       <center><input type="submit" value="Refresh/Query"></center>
>       <p>
> 
>       <input type="radio" name="mode" value="browse" checked> <b>Browse
> map</b><br>
>       <input type="radio" name="mode" value="query"> <b>Query
> feature</b><br>
>       <input type="radio" name="mode" value="nquery"> <b>Query multiple
> features</b>
> 
>       <hr>
> 
>       <p>
>       <b>Select Layers to Display: </b><br>
>       <select multiple name="layer" size=3>
> 
>         <option value="usboundaries" selected> US State Boundaries> 
>         <option value="generationplants" > EP Generation Plants
>         <option value="substations" > EP Substations
>         <option value="transmissionlines" > EP Transmission Lines
> 
>       </select>
> 
>       <p>
>       Zoom In <input type=radio name=zoomdir value=1 >
>       Pan <input type=radio name=zoomdir value=0 checked>
>       Zoom Out <input type=radio name=zoomdir value=-1 >
>       <p>
>       Zoom Size <input type=text name=zoomsize size=4 value=2>
>       <p>
> 
>       <font size=+1><b>Legend</b></font><br><hr>
>       <img src="/tmp/DEMOleg106614390932750.png"><hr>
> 
>       <p>
>       <center><INPUT NAME="ref" TYPE="image"
> SRC="/tmp/DEMOref106614390932750.png" border="0"></center>
>     </td></tr></table>
> 
>   </td></tr>
> </table>
> </center>
> 
> <input type="hidden" name="imgxy" value="299.5 299.5">
> <input type="hidden" name="imgext" value="-4574351.873995 -4032950.294076
> 4517834.162229 5059850.315722">
> <input type="hidden" name="map"
> value="/usr/local/apache2/htdocs/demoSNL3/demo.map">
> <input type="hidden" name="savequery" value="true">
> 
> <input type="hidden" name="program" value="/cgi-bin/mapserv">
> <input type="hidden" name="map_web_imagepath"
> value="/usr/local/apache2/htdocs/tmp/">
> <input type="hidden" name="map_web_imageurl" value="/tmp/">
> 
> </form>
> 
> <p><hr><p>
> 
> </body></html>
> 
> Segmentation fault
> 
> 
> Similar Post:
> -------------
> 
> I found the following response to a similar post in the archives.  This, in
> fact, does generate the same problem in my environment.  However, it is not
> the problem in the archives so I could not find out what to do with this
> problem!
> 
> --------begin post--------
> 
> Hi Matthew,
> 
> > However, if I pass any parameters at all, be they in mapserver, WMS
> > or WFS format, I get an internal server error. The error log says
> > only "premature end of script", and if I run mapserv at the command
> > line by passing a QUERY_STRING here, I get "segmentation fault".
> 
> I had a similar problem and could find out what went wrong the shp2img 
> program, that was compiled with mapserver. Run it on a shell with your 
> mapfile (e.g. shp2img -m mapfile.map -o output.png) and see, if there 
> are any errors. If yes, I think, that the same errors will happen using 
> the mapserv CGI.
> 
> hth,
> 
> Bjoern.
> 
> ---------end post--------- 
> 
> 
> Follow-up Command Line Results:
> -------------------------------
> 
> When I enter the suggested command on my own system in the subdirectory
> containing shp2img I get the "Segmentation fault" error again.  This is the
> difference between my problem and the post referenced above.
> 
> Here is the actual command that I enter and the result:
> 
> ./shp2img -m /usr/local/apache2/htdocs/demoSNL3/demo.map -o output.png
> Segmentation fault
> 
> Help Requested:
> ---------------
> 
> Now that I have isolated the problem to shpimg, what is the next step in
> resolving it?
> 
> Once again, your help is greatly appreciated!
> 
> Sincerely,
> 
> Clay
> 
>    ------------------------------------------------------------
>    Clayton J. Pryor	phone	(505) 845-3557
>    Sandia National Laboratories	
>    Critical Infrastructure Surety 	fax	(505) 844-9641
>    PO Box 5800 MS 0451			 
>    Albuquerque NM 87185-0451	email	cjpryor at sandia.gov
>    ------------------------------------------------------------
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 



More information about the MapServer-users mailing list