Bus error -- Re: [mapserver-users] Re: Perl/mapscript error

Steve Lime steve.lime at dnr.state.mn.us
Tue May 7 13:15:38 EDT 2002


Note that the current version of SWIG used to produce mapscript is 1.1.
That's what's on the University machine that produces the nightly
builds. Version 1.3.10 of SWIG seems very stable and is necessary in
order to use java. I'll probably try to switch the UMN machine shortly.
The new version of SWIG should contain the patches that Lowell mentions.
When updated old scripts will likely break whenever a new object is
created. This is because SWIG has changed the perl interface slightly to
match the other languages. So $map = new mapObj() becomes $map = new
mapscript::mapObj(). That's it. I'll let the list know when that change
will happen. In the meantime folks could try using the new versions of
SWIG to see if they are indeed more stable under mod_perl.

Steve

Stephen Lime
Data & Applications Manager

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

>>> "Lowell Filak" <lfilak at medinaco.org> 05/06/02 09:07AM >>>
It turns out that the SWIG generated mapscript.pm has the default
DETROY methods as seen/created by SWIG and there has been a known
warning that results from that. At the CGI level everything is just a
warning but when you extend it to mod_perl it becomes a fatal.
I was mistaken on the mailling list, the answer was actually in the
SWIG list here:
http://mailman.cs.uchicago.edu/pipermail/swig/2000-March/001227.html 
With a bit more information here:
http://mailman.cs.uchicago.edu/pipermail/swig/2000-March/001232.html 
Some time ago Steve L. mentioned that the default mapscript.pm did not
behave well under mod_perl, if the destroy method is the only thing
causing the problem it is an excellent development that it is now fixed.
Thank you for bringing it up.
Lowell F.

The following message was sent by Puneet Kishor
<pkishor at geoanalytics.com> on Sun, 5 May 2002 22:50:08 -0500.

> Lowell,
> 
> 
> On Friday, May 3, 2002, at 05:18  PM, Lowell Filak wrote:
> 
> > Are you using mod_perl?
> 
> yes, indeedy!!
> 
> > After looking through the Perl groups this seems to have eliminated
the 
> > errors on my scripts:
> > Change all lines:
> > my $self = tied(%{$_[0]});
> >
> > in all DESTROY methods in /usr/lib/perl/.../mapscript.pm with:
> > return unless $_[0]->isa('HASH');
> > my $self = tied(%{$_[0]});
> > return unless $self;
> 
> and yes, changing the above seems to take care of things... at least
to 
> the extent I have checked, I am not getting any errors.
> 
> when you get time, could you give a gentle explanation of what was
going 
> on, and why mod_perl caused a rash?
> 
> thanks,
> 
> pk/




More information about the mapserver-users mailing list