Opened 20 years ago

Closed 20 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:
Cc:

Description

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 by sdlime, 20 years ago

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

comment:2 by dmorissette, 20 years ago

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

comment:3 by dmorissette, 20 years ago

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 by sdlime, 20 years ago

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

comment:5 by dmorissette, 20 years ago

Status: newassigned

comment:6 by dmorissette, 20 years ago

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.