[mapserver-users] gmap demo segfault

Caffeinate The World mochaexpress@yahoo.com
Sun, 24 Nov 2002 18:03:32 -0800 (PST)


--0-1523295305-1038189812=:45714
Content-Type: text/plain; charset=us-ascii


ns01$ shp2img -m gmap75.map -o testoutput.png
Segmentation fault - core dumped
I think it's having problems loading the 'DATA bath_mapserver.tif
' file. I converted the 'bath_mapserver.tif' to 'bath_mapserver.png' and replaced that DATA line and no more coredump.
I'm wondering if this is due to mapserver or libtiff.
 Dylan Keon <keon@nacse.org> wrote:Next, try running shp2img against your mapfile to see if it can process 
the TIFF. In case you don't know, shp2img is packaged with MapServer, 
and is a command-line utility that will parse the mapfile and render an 
output image. Do something like this command and then view the output 
image to see if it works:

% shp2img -m my_mapfile.map -o output.png

--Dylan


Caffeinate The World wrote:
> I further narrowed down the cause of the problem. I commented out the 
> line below:
> 
> DATA bath_mapserver.tif
> 
> and the applet loaded. There seems to be a problem with loading tif files.
> 
> LAYER
> NAME bathymetry
> METADATA
> "DESCRIPTION" "Elevation/Bathymetry"
> END
> TYPE RASTER
> STATUS ON
> # DATA bath_mapserver.tif
> END
> 
> */Caffeinate The World /* wrote:
> 
> I turned on --enable-debug on the mapsever compile only.. php cgi
> currently doesn't have it turned on:
> 
> ...
> Reading symbols from /usr/local/lib/libproj.so...done.
> Reading symbols from /usr/pkg/lib/libtiff.so.3...done.
> #0 0x16220d06c in drawTIFF (map=0x0, layer=0x1a5, img=0x120456000,
> filename=0x0) at mapraster.c:828
> ---Type to continue, or q to quit---
> 828 vv=buf[xi+boffset];
> (gdb) bt
> #0 0x16220d06c in drawTIFF (map=0x0, layer=0x1a5, img=0x120456000,
> filename=0x0) at mapraster.c:828
> warning: Hit heuristic-fence-post without finding
> warning: enclosing function for address 0x1202fd370
> This warning occurs if you are debugging a function without any symbols
> (for example, in a stripped executable). In that case, you may wish to
> increase the size of the search with the `set heuristic-fence-post'
> command.
> 
> */Caffeinate The World /* wrote:
> 
> I narrowed the segfault down to this section of gmap75.map:
> 
> LAYER
> NAME grid
> METADATA
> "DESCRIPTION" "Grid"
> END
> TYPE LINE
> STATUS OFF
> DATA grid
> CLASS
> NAME "Graticule"
> COLOR 0 0 0
> END
> END # Layer
> 
> I still don't know what's causing the segfault. The php.core I
> have doesn't have debug on to do a backtrace.
> 
> */Caffeinate The World /* wrote:
> 
> mapserver-3.6.3
> php-4.2.2 (cgi and apache mod)
> NetBSD-Alpha-1.5.2
> Apache-1.3.22
> 
> I got mapserver going and the default demo working. Then I
> tried the gmap-3.6 demo and it segmentation fault at the
> line denoted by "HERE" below :
> 
> function GMapDrawMap()
> {
> GLOBAL $gpoMap, $gbShowQueryResults;
> GLOBAL $gbIsHtmlMode;
> GLOBAL $gszCommand, $gszZoomBoxExt;
> GLOBAL $gAppletImgFmt, $gImagesFmt;
> 
> if ($gbShowQueryResults)
> $img = $gpoMap->drawQuery();
> else
> $img = $gpoMap->draw(); //<--------HERE
> 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--0-1523295305-1038189812=:45714
Content-Type: text/html; charset=us-ascii

<P>ns01$ shp2img -m gmap75.map -o testoutput.png<BR>Segmentation fault - core dumped
<P>I think it's having problems loading the 'DATA bath_mapserver.tif<BR>' file. I converted the 'bath_mapserver.tif' to 'bath_mapserver.png' and replaced that DATA line and no more coredump.
<P>I'm wondering if this is due to mapserver or libtiff.
<P>&nbsp;<B><I>Dylan Keon &lt;keon@nacse.org&gt;</I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Next, try running shp2img against your mapfile to see if it can process <BR>the TIFF. In case you don't know, shp2img is packaged with MapServer, <BR>and is a command-line utility that will parse the mapfile and render an <BR>output image. Do something like this command and then view the output <BR>image to see if it works:<BR><BR>% shp2img -m my_mapfile.map -o output.png<BR><BR>--Dylan<BR><BR><BR>Caffeinate The World wrote:<BR>&gt; I further narrowed down the cause of the problem. I commented out the <BR>&gt; line below:<BR>&gt; <BR>&gt; DATA bath_mapserver.tif<BR>&gt; <BR>&gt; and the applet loaded. There seems to be a problem with loading tif files.<BR>&gt; <BR>&gt; LAYER<BR>&gt; NAME bathymetry<BR>&gt; METADATA<BR>&gt; "DESCRIPTION" "Elevation/Bathymetry"<BR>&gt; END<BR>&gt; TYPE RASTER<BR>&gt; STATUS ON<BR>&gt; # DATA bath_mapserver.tif<BR>&gt; END<BR>&gt; <BR>&gt; */Caffeinate The W!
orld <MOCHAEXPRESS@YAHOO.COM>/* wrote:<BR>&gt; <BR>&gt; I turned on --enable-debug on the mapsever compile only.. php cgi<BR>&gt; currently doesn't have it turned on:<BR>&gt; <BR>&gt; ...<BR>&gt; Reading symbols from /usr/local/lib/libproj.so...done.<BR>&gt; Reading symbols from /usr/pkg/lib/libtiff.so.3...done.<BR>&gt; #0 0x16220d06c in drawTIFF (map=0x0, layer=0x1a5, img=0x120456000,<BR>&gt; filename=0x0) at mapraster.c:828<BR>&gt; ---Type <RETURN>to continue, or q <RETURN>to quit---<BR>&gt; 828 vv=buf[xi+boffset];<BR>&gt; (gdb) bt<BR>&gt; #0 0x16220d06c in drawTIFF (map=0x0, layer=0x1a5, img=0x120456000,<BR>&gt; filename=0x0) at mapraster.c:828<BR>&gt; warning: Hit heuristic-fence-post without finding<BR>&gt; warning: enclosing function for address 0x1202fd370<BR>&gt; This warning occurs if you are debugging a function without any symbols<BR>&gt; (for example, in a stripped executable). In that case, you may wish to<BR>&gt; increase the size of the search with the `set he!
uristic-fence-post'<BR>&gt; command.<BR>&gt; <BR>&gt; */Caffeinate The World <MOCHAEXPRESS@YAHOO.COM>/* wrote:<BR>&gt; <BR>&gt; I narrowed the segfault down to this section of gmap75.map:<BR>&gt; <BR>&gt; LAYER<BR>&gt; NAME grid<BR>&gt; METADATA<BR>&gt; "DESCRIPTION" "Grid"<BR>&gt; END<BR>&gt; TYPE LINE<BR>&gt; STATUS OFF<BR>&gt; DATA grid<BR>&gt; CLASS<BR>&gt; NAME "Graticule"<BR>&gt; COLOR 0 0 0<BR>&gt; END<BR>&gt; END # Layer<BR>&gt; <BR>&gt; I still don't know what's causing the segfault. The php.core I<BR>&gt; have doesn't have debug on to do a backtrace.<BR>&gt; <BR>&gt; */Caffeinate The World <MOCHAEXPRESS@YAHOO.COM>/* wrote:<BR>&gt; <BR>&gt; mapserver-3.6.3<BR>&gt; php-4.2.2 (cgi and apache mod)<BR>&gt; NetBSD-Alpha-1.5.2<BR>&gt; Apache-1.3.22<BR>&gt; <BR>&gt; I got mapserver going and the default demo working. Then I<BR>&gt; tried the gmap-3.6 demo and it segmentation fault at the<BR>&gt; line denoted by "HERE" below :<BR>&gt; <BR>&gt; function GMapDrawMap()<BR>&gt;!
 {<BR>&gt; GLOBAL $gpoMap, $gbShowQueryResults;<BR>&gt; GLOBAL $gbIsHtmlMode;<BR>&gt; GLOBAL $gszCommand, $gszZoomBoxExt;<BR>&gt; GLOBAL $gAppletImgFmt, $gImagesFmt;<BR>&gt; <BR>&gt; if ($gbShowQueryResults)<BR>&gt; $img = $gpoMap-&gt;drawQuery();<BR>&gt; else<BR>&gt; $img = $gpoMap-&gt;draw(); //&lt;--------HERE<BR>&gt; <BR></BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail Plus</a> - Powerful. Affordable. <a href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up now</a>
--0-1523295305-1038189812=:45714--