Opened 14 years ago

Closed 14 years ago

#559 closed defect (fixed)

abnormal program termination when having multiple PROJECTION

Reported by: bartvde@… Owned by: dmorissette
Priority: high Milestone: 4.2 release
Component: MapServer C Library Version: 4.1
Severity: normal Keywords:


When your PROJECTION is defined twice in the MAP file, you get an abnormal
program termination. This is the excerpt from the Apache error log:

Premature end of script headers: mapserv.exe
Assertion failed: p->proj == NULL, file mapfile.c, line 790
abnormal program termination

Change History (6)

comment:1 Changed 14 years ago by sdlime

So what's the proper behavior, assume the second projection or fail a bit more

comment:2 Changed 14 years ago by dmorissette

I would say that we should give a fatal error (and fail gracefully) since having
2 projections is illegal.

comment:3 Changed 14 years ago by dmorissette

Cc: warmerdam@… steve.lime@… added
Milestone: 4.2 release
Owner: changed from sdlime to morissette@…
Sounds like an easy one to fix for 4.2.  Do we all agree on producing a fatal
error if more than one projection is defined?

comment:4 Changed 14 years ago by sdlime

Yup, cause this will only occur when the developer is setting up and debugging
an app.

comment:5 Changed 14 years ago by dmorissette

Status: newassigned

comment:6 Changed 14 years ago by dmorissette

Resolution: fixed
Status: assignedclosed
Fixed.  I left the assert() in msProcessProjection(), but I added a msSetError()
inside loadProjection() so that the message shows up only if it happens during
mapfile parsing (it also includes the line number).

The assert() should never show up again unless some code somewhere does
something wrong which is what asserts are for.
Note: See TracTickets for help on using tickets.