Ticket #559 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

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

Changed 11 years ago by sdlime

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

Changed 11 years ago by dmorissette

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

Changed 11 years ago by dmorissette

  • cc warmerdam@…, steve.lime@… added
  • owner changed from sdlime to morissette@…
  • milestone set to 4.2 release
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?

Changed 11 years ago by sdlime

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

Changed 11 years ago by dmorissette

  • status changed from new to assigned

Changed 11 years ago by dmorissette

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