glibc error in queryByPoint call
Lowell Filak
lfilak at MEDINACO.ORG
Fri Apr 15 12:53:53 PDT 2005
The following message was sent by Aaron Craig <mercutio at POBOX.COM> on
Thu, 14 Apr 2005 11:45:03 +0200.
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Here's some code:
>
> #!/usr/bin/perl
>
> use warnings;
> use strict;
>
> use mapscript;
>
> $| = 1;
>
> my $map = new
>
mapscript::mapObj("/home/aaron/dev/OpenPortal/app/PortalData/confartigianato/Tag/MapServer/Sardegna.map")
> ~ || die("Couldn't make a mapscript::mapObj: "._GetMapscriptError());
> my $lyr = $map->getLayerByName("musei")
> ~ || die("Can't get layer: "._GetMapscriptError());
> my $pnt = mapscript::pointObj->new();
>
> # map extent as defined in Sardegna.map: 1426638 4301755 1570229 4573136
> $pnt->{x} = 1513869.5325;
> $pnt->{y} = 4517136.74603175;
> $lyr->{template} = "DummyTemplateOrQueriesWontWork"
> ~ if(!$lyr->{template});
>
> my $rst = $lyr->queryByPoint($map, $pnt, $mapscript::MS_SINGLE, 10);
>
> sub _GetMapscriptError
> {
> my $sReturn = "\n================================\n";
> my $err = mapscript::errorObj->new();
> while($err && $err->{code} != $mapscript::MS_NOERR)
> {
> $sReturn .= "\tError in '$err->{routine}': code
$err->{code} (see
> documentation for error code meanings.)\n";
> $sReturn .= "\tError message: $err->{message}\n";
> $err = $err->next();
> }
>
> return "$sReturn\n================================\n";
> }
>
> =pod
> Mapfile
>
> MAP # [minx] [miny] [maxx] [maxy]
> ~ EXTENT 1426638 4301755 1570229 4573136
> STATUS ON
> SIZE 400 756
> IMAGETYPE PNG
> UNITS METERS
>
> SYMBOLSET "../../../Common/MapServer/Symbols/default.sym"
> FONTSET "../../../Common/MapServer/fonts.list"
>
> DEBUG ON
>
> WEB
> TEMPLATE 'index.html'
> HEADER 'Templates/header.html'
> FOOTER 'Templates/footer.html'
> IMAGEPATH
'var/www/OpenPortal/htdocs/confartigianato/Images/'
> IMAGEURL '/'
> LOG '/var/www/OpenPortal'
> END
>
> # Layers for displaying clicks
>
> LAYER
> NAME "musei"
> TYPE POINT
> STATUS OFF
>
> CONNECTION 'user=tsc2 password=tsc2 dbname=geo_sardegna'
> CONNECTIONTYPE POSTGIS
> DATA 'the_point from musei'
>
> CLASS
> NAME "musei"
> STYLE
> SYMBOL
> "/var/www/OpenPortal/htdocs/confartigianato/Images/icona_small.gif"
> SIZE 10
> COLOR 0 0 0
> END
> LABEL
> TYPE BITMAP
> SIZE TINY
> COLOR 0 0 0
> POSITION AUTO
> PARTIALS FALSE
> BUFFER 1
> END
> END
> END
>
>
> END
>
> =cut
>
> Here's the error message:
>
> [aaron at Zaphod Utilities]$ ./TestMapServerQuery.pl
> *** glibc detected *** double free or corruption (!prev): 0x083654c0 ***
> Aborted
>
>
> Any ideas? I've tried Google but come up with nothing helpful.
>
> Thanks!
>
> - --
Aaron,
I don't have direct experience with this, but can you do something like:
dbg perl core
> bt
and obtain some more information?
Lowell
More information about the MapServer-users
mailing list