[mapserver-users] bug with 3.6.1 perl mapscript $map->{shapepath}

Steve Lime steve.lime at dnr.state.mn.us
Tue Sep 10 13:43:27 EDT 2002


I ran into this a couple of months ago and have already debugged and
fixed it. The fix should be present
in the 3.7 branch for sure, but probably didn't make it to the 3.6
branch. I'll have to check to be sure.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Chris Stuber <imap at chesapeake.net> 09/09/02 04:59PM >>>


I ran across this bug with perl mapscript
where I access this variable (in a read-only capacity):

my $myshapepath = $map->{shapepath};

print "shapepath= $myshapepath\n";
$myshapepath = $map->{shapepath};
print "shapepath= $myshapepath\n";

Initially, it returns the correct value (defined in my
mapfile) but afterwards, the $map->{shapepath} becomes
corrupt, and all subsequent mapscript operations fail.

shapepath= /data   <--  after first variable is set
perl in free(): warning: chunk is already free.  <-- error
shapepath= shapepath  <-- after second variable is set

For the time being, I have hardcoded my shapepath in
my mapscript, but needs a fix.

Thanks,

Chris




More information about the mapserver-users mailing list