[Mapserver-users] perl/mapscript segfault with CGI
Lowell Filak
lfilak at medinaco.org
Wed Jul 7 13:29:34 PDT 2004
Manfred,
Does /var/log/apache2/error_log provide any additional information for
the segfault?
What does the URL/CGI::Vars() contain, ie
"?img.x=378&img.y=134&ppn=&mode=browse&zoomdir=1&zoomsize=10&imgxy=..."?
Thanks.
Lowell
The following message was sent by Manfred Meier <m.meier at spiekermann.de>
on Sat, 26 Jun 2004 11:24:49 +0200.
> Hello list,
>
> the following (reduced on minimum) program runs fine. But if I change
> the order of the two statements "my $map = new..." and "my $vv = CGI..."
> the I get a segfault in the line "$slayer->draw...".
>
> Does someone has an idea if i do something wrong? Or how i can debug to
> get more information? I'm using Linux (suse 9) and mapserver 4.0.2.
>
> Thank you
> Manfred
>
> #!/usr/bin/perl
>
> use strict;
> use CGI qw/:standard/;
> use mapscript;
>
> my $map = new mapscript::mapObj ("/usr/local/httpd/cgi-bin/" .
> "essen/t1lin.map");
> my $vv = CGI::Vars();
>
> my $img = $map->prepareImage ();
> my $slayer = $map->getLayerByName("stadtplan_2");
> $slayer->draw($map, $img);
> $map->drawLabelCache ($img);
>
> my $file = "/tmp/map000";
> $img->save ($file);
>
> The MAP-File is like:
>
> #
> # Start of map file
> #
> NAME t1
> STATUS ON
> SIZE 800 500
> EXTENT 2562000 5696000 2579000 5711000
> UNITS METERS
> TRANSPARENT OFF
> SHAPEPATH "/usr/local/MAP-TEST"
>
> LAYER
> NAME stadtplan_2
> TYPE raster
> STATUS default
> DATA "stadtplan.tif"
> END # LAYER
>
> END # Map File
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list