Ticket #2343 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Runtime error querying raster layers

Reported by: mikitessaro Assigned to: warmerdam
Priority: normal Milestone: 5.0.1 release
Component: GDAL Support Version: 5.0
Severity: normal Keywords: raster query libmap error
Cc: sdlime

Description (Last modified by warmerdam)

Performing queries with mode=nquery on raster layers raises a runtime error. Windows signals an error on libmap.dll at offset 000a26b7 (if can help). Tested un Windows 2003 server with MapServer 5.0, installed from ms4w version 2.2.6 (September 18 2007). Query on raster layers works fine for MapServer 4.10.

Example of query: http://myserver/cgi-bin/mapserv.exe?mode=nquery&mapxy=2343893.06%20205111754.6&map=C%3A%5Cmaptest.map

Map file:

MAP
  SIZE              332 322
  EXTENT            2313596.6 5047374.695 2435539.84 5169317.935
  PROJECTION
    "init=epsg:26592"
    "units=m"
    "pm=greenwich"
    "lon_0=15.0"
  END

  WEB
    MINSCALE        10
    MAXSCALE        1000000000
    LOG             "C:\Temp\mapserver.log"
    IMAGEPATH       "C:\Temp\web\"
    IMAGEURL        "/webmaps/"
  END

  LAYER
    NAME            "DTM"
    DEBUG           ON
    STATUS          DEFAULT
    DATA            "C:\DTM_RegioneColore.tif"
    TYPE            RASTER
    TEMPLATE        "C:\DTMMapQueryTemplate.html"

    CLASS
      NAME          "DTM"
    END
  END
END

File DTMMapQueryTemplate.html

<result>
  <layer name="DTM">
    <extent>
      <top>[shpmaxy]</top>
      <left>[shpminx]</left>
      <bottom>[shpminy]</bottom>
      <right>[shpmaxx]</right>
    </extent>
  </layer>
</result>

Change History

10/04/07 13:18:11 changed by sdlime

  • cc set to warmerdam.

10/04/07 13:31:22 changed by warmerdam

  • owner changed from sdlime to warmerdam.
  • cc changed from warmerdam to sdlime.
  • component changed from MapServer CGI to GDAL Support.
  • milestone set to 5.0.1 release.

I'll take this one...

10/04/07 13:37:39 changed by warmerdam

  • status changed from new to assigned.

Where can I find a copy of DTM_RegioneColore.tif so that I can reproduce this problem?

10/08/07 09:12:41 changed by mikitessaro

The image is big (28M). You can download it from http://www.sistemigrafici.insiel.it:8080/Consultatore/DTM_RegioneColore.tif . There is also the tfw file: http://www.sistemigrafici.insiel.it:8080/Consultatore/DTM_RegioneColore.tfw . I think that the problem isn't related to the particular image.

10/08/07 11:15:09 changed by warmerdam

  • description changed.

10/08/07 12:14:58 changed by warmerdam

  • status changed from assigned to closed.
  • resolution set to fixed.

I have reproduced the problem. The issue is with raster queries against classified raster layers with no styles. Sloppy old code was still accessing styles[0] which worked in 4.10 because things were not dynamic. Now that the styles list is dynamic the pointer is NULL.

The problem has been fixed in trunk (r6931) and 5.0 branch (r6932). The fix will appear in 5.0.1 when issued.

PS.

I think the example query should have been:

http://myserver/cgi-bin/mapserv.exe?mode=nquery&mapxy=2343893.06%205111754.6&map=C%3A%5Cmaptest.map

Otherwise the target is (way) off the image and the problem does not manifest.