Opened 14 years ago

Closed 14 years ago

#3352 closed defect (fixed)

Bad Grid causes problems . error message not helpful.

Reported by: h4ck3rm1k3 Owned by: warmerdam
Priority: normal Milestone: 5.6.2 release
Component: MapServer C Library Version: 5.6
Severity: normal Keywords: grid
Cc: sdlime

Description

Bad Grid in mapserver

LAYER
 NAME "grid"
 TYPE LINE
 STATUS DEFAULT
 GRID
  LABELFORMAT "DDMM"
   MAXARCS 10
  MAXINTERVAL 10
  MAXSUBDIVIDE 2
END
END # Layer

produces :

==> /var/log/apache2/error.log <==
[Sat Feb 27 20:02:56 2010] [error] [client ::1] Premature end of script

Change History (3)

comment:1 by h4ck3rm1k3, 14 years ago

Full Map file:

MAP

#CONFIG "MS_ERRORFILE" "/var/tmp/ms.log"
DEBUG 5
EXTENT 19.141481 41.002088 19.997634 41.999861
SIZE 600 600
UNITS METERS
STATUS ON
NAME "TEST"
IMAGECOLOR 155 155 155
IMAGETYPE PNG


LAYER
 NAME "grid"
 TYPE LINE
 STATUS DEFAULT
 GRID
  LABELFORMAT "DDMM"
   MAXARCS 10
  MAXINTERVAL 10
  MAXSUBDIVIDE 2
END
END # Layer

END

URL:

http://localhost:8080/cgi-bin/mapserv?map=%2Fvar%2Fwww%2Fmapserver%2Ftest2.map&mode=map

comment:2 by warmerdam, 14 years ago

Cc: sdlime added
Keywords: grid added
Milestone: 5.6.1 release
Owner: changed from sdlime to warmerdam
Severity: minornormal

I have reproduced a crash in msGraticuleLayerOpen() where there seems to be an assumption there will be at least one CLASS available. I will dig a bit deeper and ensure that the code at least issues a clean runtime error rather than crashing, and possibly even does not depend on the class if that seems appropriate.

comment:3 by warmerdam, 14 years ago

Milestone: 5.6.2 release
Resolution: fixed
Status: newclosed

I have fixed the GraticuleLayerOpen function to not crash if there are no classes, and also to issue a debug message if there are no classes since it not produce anything useful.

The change is in trunk (r9905) and 5.6 branch (r9906).

Note: See TracTickets for help on using tickets.