Opened 12 years ago

Closed 12 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 12 years ago by sdlime

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

comment:2 Changed 12 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 12 years ago by dmorissette

  • Cc warmerdam@… steve.lime@… added
  • Milestone set to 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 12 years ago by sdlime

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

comment:5 Changed 12 years ago by dmorissette

  • Status changed from new to assigned

comment:6 Changed 12 years ago by dmorissette

  • Resolution set to fixed
  • Status changed from assigned to closed
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.