<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Unfortunately, I can't do either on the server at the moment - I am
limited to PHP MapScript.<br>
<br>
I have narrowed it down to the $oImg = $oMap->draw(); call in
tile.php (line 224) -- that's where it crashes. <br>
<br>
I tried to turn on MapServer debug mode with DEBUG ON and LOG "xxxx" in
the .map file, as well as through MapScript inside tile.php, but I get
no log file or anything in the syslog. Does this not work with ka-Map?
Would I get anything useful in any case?<br>
<br>
David<br>
<br>
<br>
Steve Lime wrote:
<blockquote cite="mids405a3f2.046@co5.dnr.state.mn.us" type="cite">
<pre wrap="">What happens when you render the mapfile outside of ka-map and
outside of mapscript? That is, using shp2img or mapserv CGI?
Steve
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">David Badke <a class="moz-txt-link-rfc2396E" href="mailto:dbadke@uvic.ca"><dbadke@uvic.ca></a> 03/01/06 1:14 PM >>>
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->Jon:
The only thing I've seen was from the MapServer list (see below). The
systems guys here applied the patch, but it didn't help. I have since
run a test generating TrueType text using only GD/FreeType, which
worked, and ka-Map tile.php with TYPE BITMAP in my .map file, which
worked. Setting TYPE TRUETYPE causes the segmentation fault, and no one
knows why... We are assuming it is some problem -- possibly
configuration -- with PHP MapScript --> GD --> FreeType; it doesn't look
like a problem in tile.php itself. MapScript is not generating any
error, just crashing, so it is proving hard to track down.
Since no one else has reported a similar problem here, I guess no one
else has seen this error... :'(
David
>From the MapServer mailing list (14 Feb 2006):
--------------------------------------------
Hi all: There have been a number of users reporting issues with 1 pixel
wide antialiasing
seg. faults and version 4.8. There is a problem with GD. The library
does not properly
check pixel values against the image size which can result in a buffer
overflow in some
cases. The GD author is aware of the problem but has not released a fix
yet- no idea
why since it is a pretty severe error.
Anyway, to use 1 pixel-wide antialiasing you *MUST* apply a small fix to
GD. Fortunately
the fix is a one-liner.
In gd.c, function gdImageSetAAPixelColor() change:
int dr,dg,db,p,r,g,b;
p = gdImageGetPixel(im,x,y);
to:
int dr,dg,db,p,r,g,b;
if (!gdImageBoundsSafeMacro (im, x, y)) return;
p = gdImageGetPixel(im,x,y);
-----------------------------------------------------------------------------------------
Jon Fatula wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi, David,
No insights, just commiseration: after struggling mightily with 4.8/gd
under RedHat ES3, I gave up and dropped back to 4.6.2... Have you seen
any off-list patches or suggestions?
Thanks!
-jon
Jon Fatula
jonf at cruzio.com
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:ka-map-users-bounces@lists.maptools.org">ka-map-users-bounces@lists.maptools.org</a>
[<a class="moz-txt-link-freetext" href="mailto:ka-map-users-bounces@lists.maptools.org">mailto:ka-map-users-bounces@lists.maptools.org</a>]On Behalf Of David Badke
Sent: Monday, February 27, 2006 11:29 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:ka-map-users@lists.maptools.org">ka-map-users@lists.maptools.org</a>
Subject: [ka-Map-users] Segmentation fault in tile.php
I am running ka-Map on a local Windows XP system, and now on a remote
Linux server. Both systems are running the same ka-Map code (version 0.2
with mods) and version 4.8 of MapServer/ PHP MapScript. On the Windows
system, everything is working; on Linux, everything is working except a
label layer. All of the relevant files are the same on both systems. The
layer is:
LAYER
NAME "Labels"
GROUP "Labels"
STATUS OFF
DATA "vicbird1878"
TYPE ANNOTATION
LABELITEM "LABEL"
MAXSCALE 150
SYMBOLSCALE 71
CLASS
LABEL
TYPE TRUETYPE
FONT "lucida-sans"
SIZE 9
POSITION UC
OFFSET 0 8
COLOR 0 0 0
BACKGROUNDCOLOR 255 255 255
MINSIZE 8
MAXSIZE 10
BUFFER 1
END
END
END
There is also a raster layer and a point layer; the point layer uses the
same shape file as the annotation layer, and displays correctly on both
systems.
With TYPE TRUETYPE, I get no labels on Linux (I do on Windows). If I run
tile.php directly (on the Linux server) in Firefox (with appropriate t,
l, g, s, etc. parameters) I get an "internal server error (500)"
response in the browser, and the server log reports a segmentation fault
(the same tile.php URL produces the correct label on the Windows
system). If I change the layer to TYPE BITMAP, I get no error but still
get no labels -- the tiles are created but are blank (white). If I use
TrueType but change the FONT to something nonexistent ("xxxxx"), there
is also no error (and of course no label), which suggests that my font
set file is OK and the "lucida-sans" font file is being found.
I noticed a problem report on the MapServer list about segmentation
faults with MS 4.8 and GD, but that had to do with antialiasing, which I
have not turned on (the server guys are looking into the bug anyway, in
case there is some antialiasing going on that I don't know about).
Anyone have any idea what might be going wrong on the Linux server? I am
getting nowhere on this...
David
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
David Badke
Humanities Computing and Media Center
University of Victoria, BC, Canada</pre>
</body>
</html>