<div>I am having a very bizarre problem with MapServer and GetFeatureInfo requests, and I'm wondering if anyone has had similar problems and/or has ideas about how to address it.</div><div><br></div><div>I have a raster layer (actually, a bunch of them) where MapServer sometimes segfaults when serving a GetFeatureInfo request, depending on the coordinate of the point being queried.  I have come up with a couple of test cases, which are exactly identical to each other except for the value of X in the GetFeatureInfo request.  In one case, X=913, and MapServer  correctly processes the GetFeatureInfo request and returns correct results.  In the other case, X=912, and MapServer segfaults.  Both of these values of X are valid, and both  correspond to pixels in the image where MapServer correctly displays the raster in question when called with a GetMap request.</div>
<div><br></div><div>My hunch is that the problem might be related to a misconfiguration of MapServer on my part, or a misconfiguration of the projections involved.  The layer data is in a LAEA projection, and due to constraints on this project that are beyond my control, I have MapServer reprojecting it to a bizarre web mercator projection (EPSG 3857, aka EPSG 3785) for output, so the GetFeatureInfo request is expressed in EPSG 3857.  But I'm stumped as to what the problem could be, and having MapServer crash with a segmentation fault seems like an indication of some kind of bug, even if I've got a configuration error.</div>
<div><br></div><div>I've tried turning on debugging in the mapfile, but nothing useful shows up in the log file.</div><div><br></div><div>I've also tested this with several versions of MapServer, including 6.0.3 and 6.2-beta1, with the same results.  I'm running these tests on a CentOS 6.2 system, compiling MapServer with the options --with-proj --with-ogr --with-gdal --with-wfs --with-wcs --with-wms --with-wmsclient --with-wfsclient and --with-php=/usr/include/php, and using gdal 1.7.2 and</div>
<div>proj 4.7.0.</div><div><br></div><div>If you have any thoughts about what the problem could be, I'd love to hear from you!  I'll append my mapfile below, along with the two test requests I mentioned above.</div>
<div><br></div><div>The layer data file that I am using is too big to attach to this email, but I've created a tgz file containing everything needed to run my tests -- the mapfile, layer file, and test script; you can download it here:</div>
<div><br></div><div>      <a href="http://rain.nemac.org/~mbp/mapserver-gfi-problem.tgz">http://rain.nemac.org/~mbp/mapserver-gfi-problem.tgz</a></div><div><br></div><div>If anyone wants to download this and try it with your copy of MapServer, let me know whether you get the same results that I'm getting!</div>
<div><br></div><div>Thanks in advance!</div><div><br></div><div>--Mark</div><div><br></div><div>Here is the mapfile I am using:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>MAP</div>
</div><div><div>  CONFIG "MS_ERRORFILE" "mapserver.log"</div></div><div><div>  DEBUG 5</div></div><div><div>  PROJECTION</div></div><div><div>    "init=epsg:3857"</div></div><div><div>  END</div>
</div><div><div>  WEB</div></div><div><div>    HEADER "./dummy_template"</div></div><div><div>    FOOTER "./dummy_template"</div></div><div><div>    METADATA</div></div><div><div>      "ows_enable_request"     "*"</div>
</div><div><div>      "wms_srs"                "EPSG:3857"</div></div><div><div>    END</div></div><div><div>  END</div></div><div><div>  LAYER</div></div><div><div>    NAME layer1</div></div><div><div>
    PROJECTION</div></div><div><div>      "+proj=laea"</div></div><div><div>      "+lat_0=45"</div></div><div><div>      "+lon_0=-100"</div></div><div><div>      "+x_0=0"</div></div>
<div><div>      "+y_0=0"</div></div><div><div>      "+a=6370997"</div></div><div><div>      "+b=6370997"</div></div><div><div>      "+units=m"</div></div><div><div>      "+no_defs"</div>
</div><div><div>    END</div></div><div><div>    TYPE     RASTER</div></div><div><div>    DUMP     TRUE</div></div><div><div>    STATUS   OFF</div></div><div><div>    DATA     layer1.tif</div></div><div><div>    HEADER   ./dummy_template</div>
</div><div><div>    TEMPLATE ./dummy_template</div></div><div><div>    METADATA</div></div><div><div>      "wms_title"             "layer1"</div></div><div><div>      "wms_abstract"          "layer1"</div>
</div><div><div>      "gml_include_items"     "value_0"</div></div><div><div>    END</div></div><div><div>  END</div></div><div><div>END</div></div></blockquote><div><br></div><div>And here are the two query strings for the two test cases:</div>
<div><br></div><div>    this one runs correctly:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>map=./mapfile.map&TRANSPARENT=true&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&STYLES=&FORMAT=image/png&INFO_FORMAT=application/vnd.ogc.gml&BBOX=-11859604.53136514,4696887.582602486,-11830673.11615924,4710053.860724591&CRS=EPSG:3857&LAYERS=layer1&QUERY_LAYERS=layer1&WIDTH=1514&HEIGHT=689&X=913&Y=334</div>
</div></blockquote><div><div>    this one causes a seg fault:</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>map=./mapfile.map&TRANSPARENT=true&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&STYLES=&FORMAT=image/png&INFO_FORMAT=application/vnd.ogc.gml&BBOX=-11859604.53136514,4696887.582602486,-11830673.11615924,4710053.860724591&CRS=EPSG:3857&LAYERS=layer1&QUERY_LAYERS=layer1&WIDTH=1514&HEIGHT=689&X=912&Y=334</div>
</div></blockquote>