glibc error in queryByPoint call

Aaron Craig mercutio at POBOX.COM
Thu Apr 14 05:45:03 EDT 2005


-----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 Craig
mercutio at pobox.com

===========================================================
Get Firefox!
http://www.spreadfirefox.com/?q=affiliates&id=0&t=1
===========================================================


- -=-=-
Sweet are the uses of adversity. -- Romeo and Juliet
- -=-=-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCXjufoyEQRcU83p4RAqNsAJ0QAWSgzzikkikmgzYzTfUvRT/a+gCfQdBx
mpBzN0WmLz5B+nJacNrZ+ek=
=wqK4
-----END PGP SIGNATURE-----



More information about the mapserver-users mailing list