#698 closed defect (fixed)
[MapServer]Raster layer with tileindex is not displayed
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | GDAL Support | Version: | 4.3 |
Severity: | normal | Keywords: | VERIFIED |
Cc: |
Description
Raster layer with associated tileindex is not displayed within a MapServer template. A tiff layer is loaded correctly within a similar template. I'll attach the MapServer template, map file and the query templates (raster_query2.tgz). Data used is the one that comes with msautotest tests suite. This data needs to be copied in "raster_query2/" directory. Fedora Core 1 Mozilla 1.6 MapServer CVS 20040528
Attachments (1)
Change History (6)
by , 20 years ago
Attachment: | raster_query2.tgz added |
---|
comment:1 by , 20 years ago
Summary: | [MapServer]Raster layer with tileindex is not displayed → [MapServer]Raster layer with tileindex is not displayed |
---|
Here is the patch: The bug is caused by the fact that filename is assigned a value later freed by closing shapefile. Index: mapraster.c =================================================================== RCS file: /data2/cvsroot/mapserver/mapraster.c,v retrieving revision 1.116 diff -u -r1.116 mapraster.c --- mapraster.c 28 May 2004 18:34:34 -0000 1.116 +++ mapraster.c 30 May 2004 11:06:57 -0000 @@ -1325,11 +1325,11 @@ if(status == MS_DONE) break; // no more tiles/images if(layer->data == NULL) // assume whole filename is in attribute field - filename = tshp.values[tileitemindex]; + strcpy(tilename, tshp.values[tileitemindex]); else { sprintf(tilename, "%s/%s", tshp.values[tileitemindex], layer->data); - filename = tilename; } + filename = tilename; msFreeShape(&tshp); // done with the shape } else {
comment:3 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have reviewed and applied this patch. Technically the problem is that the tileindex shape was freed before the filename was used. This was recently introduced (by Steve I think) in an effort to fix the leaking of the tileindex shapes. I have verified that this bug did not exist in the 4.2 branch.
Note:
See TracTickets
for help on using tickets.
MapServer template and map file