[Mapserver-users] mygis segfault

Peter Drake pdrake at gmail.com
Thu Jul 1 09:58:48 EDT 2004


I am getting a segfault whenever I try to query a MySQL layer. 
mapserver will display these layers fine but queries end up in a
segfault.  I don't know enough about programming to find a solution to
the problem on my own.  Can someone point me in the right direction? 
Thanks!

Here is the command I am executing through gdb:

./map QUERY_STRING="map=/home/virtual/datashed.org/var/www/html/63data/sri.map&img.x=267&img.y=184&imgext=-175215.839633+222601.687635+-136511.908365+250694.301873&mode=nquery&zoomdir=&program=/cgi-bin/maps&map_web_imagepath=/home/virtual/datashed.org/var/www/html/gis/&map_web_imageurl=gis/&map_imagetype=jpeg80&qlayer=Projects+in+Progress"

The results returned (it fills out the query header template but then
segfaults before filling out the query template):

Content-type: text/html

<map>
        <maplon>-79.863167</maplon>
        <maplat>41.126484</maplat>
        <map_x>-156426.840272</map_x>
        <map_y>237771.699324</map_y>
</map>

Program received signal SIGSEGV, Segmentation fault.
0xb7115d33 in strlen () from /lib/tls/libc.so.6

The backtrace from gdb:

#0  0xb7115d33 in strlen () from /lib/tls/libc.so.6
#1  0xb7115a75 in strdup () from /lib/tls/libc.so.6
#2  0x08079723 in msMYGISLayerOpen (layer=0x8120874) at mapmygis.c:318
#3  0x0807bca6 in msLayerOpen (layer=0x8120874) at maplayer.c:150
#4  0x080595dc in msReturnQuery (msObj=0x8105e08,
    pszMimeType=0x8127938 "text/html", papszBuffer=0x0) at maptemplate.c:2730
#5  0x0805313f in msReturnTemplateQuery (msObj=0x8105e08,
    pszMimeType=0x8127938 "text/html", papszBuffer=0x0) at maptemplate.c:212
#6  0x0805074b in main (argc=-1227358200, argv=0xbfffe554) at mapserv.c:1338



More information about the mapserver-users mailing list