Opened 19 years ago

Closed 19 years ago

#1283 closed defect (fixed)

grouped and named layers with REQUIRES cause Internal Server Error

Reported by: yuri0002@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer CGI Version: 4.8
Severity: minor Keywords:
Cc: sgillies@…, bugzilla@…, sylvain.pasche@…, tims@…

Description

LAYER
	NAME 'L1'
	GROUP 'GR'
	REQUIRES '[L3]'
	...
END
LAYER
	NAME 'L2'
	GROUP 'GR'
	REQUIRES '[L4]'
	...
END
Request of layer "GR" will cause 500 Internal Server Error ("Premature end of 
script headers: /usr/local/www/cgi-bin/mapserv") unless NAME or REQUIRES is 
commented out for one of layers.
There is no such bug in version 4.2

Attachments (1)

patch_require.diff (1.8 KB ) - added by sylvain.pasche@… 19 years ago.
Quick and dirty patch to avoid infinite recursion

Download all attachments as: .zip

Change History (14)

comment:1 by sdlime, 19 years ago

Status: newassigned
This a good clue, thanks. The requires support was basically broken in 4.2 and 
only recently fixed. Looks to still be an issue though.

Steve

comment:2 by sylvain.pasche@…, 19 years ago

Cc: bugzilla@… added

comment:3 by sylvain.pasche@…, 19 years ago

*** Bug 1309 has been marked as a duplicate of this bug. ***

by sylvain.pasche@…, 19 years ago

Attachment: patch_require.diff added

Quick and dirty patch to avoid infinite recursion

comment:4 by sdlime, 19 years ago

I'll have a look at your patch. Thanks...

Steve

comment:5 by sylvain.pasche@…, 19 years ago

Cc: sylvain.pasche@… added

comment:6 by sgillies@…, 19 years ago

Cc: sgillies@… added
This is a not minor regression in MapServer's capabilities to me. I have a
customer who can't upgrade a mapfile to MapServer 4.4 or 4.6 because of this bug.

comment:7 by sdlime, 19 years ago

That was a subtle kick in the pants. I'll address this one this evening (before 
any 4.6.1 release). The patch simply turns off the functionality which isn't a 
good fix.

I am suprised this is holding up upgrades since it didn't work at all in 4.4 
due to changes made by other developers...

Steve

comment:8 by sgillies@…, 19 years ago

I meant that they can't upgrade *to* 4.4 or 4.6. Is requires completely broken,
then? If so, my users can probably accept that and commit to writing the
workarounds.

comment:9 by sdlime, 19 years ago

Lemme try to fix tonite before starting on workarounds. It's not completely 
broken in 4.6, but the group issue pointed out in this bug causes problems in 
certain instances. I'm using REQUIRES in production apps with no problem.

Steve

comment:10 by sdlime, 19 years ago

Ok, I found the problem in maputil.c - stupid on my part. The fix was easy but I
had to disable the [raster] context option. There's no way, as it was setup, to
avoid possible recursion errors with that. May need to expand that option into
the list of RASTER layers or something like that. Anyway, this did not make it
into 4.6.1, but we could do a 4.6.2 very soon. Can folks test on their end and
let me know how it goes?

Steve

comment:11 by tims@…, 19 years ago

I'm rewriting my mapscript workaround for this bug and wanted to get
confirmation on something.

If I have a layer with REQUIRES ![raster], and the raster layer is DEFAULT, even
if the map scale is <= MINSCALE or > MAXSCALE for the raster, my layer (with
REQUIRES ![raster]) will not display.  Correct?

(I need to write a workaround because I have scale dependent raster layers with
alpha bands that aren't necessarily "background" layers.)

Thanks,
Tim

comment:12 by tims@…, 19 years ago

Cc: tims@… added

comment:13 by sdlime, 19 years ago

Resolution: fixed
Status: assignedclosed
Version: 4.44.8
I don't think I will re-implement the raster option. Too many problems. Not a
bad idea but not universally applicable. Marking as fixed for 4.8. I can
backport if there is sufficient interest.

Steve
Note: See TracTickets for help on using tickets.