Mapscript ,Mono, Apache and Linux : a great story

Tamas Szekeres szekerest at GMAIL.COM
Wed Jun 21 13:23:56 PDT 2006


Xavier,

I would assure you i am keen to look for a fix for your issue. This problem
was reported for java as well. I was dealing with mostly by reviewing your
code so far, but it seems i shall have to set up a proper evironment to
reproduce this problem. Unfortunately i didn't have enough time to realize
it. Please confirm me about the followings i know about this issue is true:

1. The problem is manifested with the mono runtime using linux/apache with
mod_mono
2. The problem is systematic and occurs every time when calling
pLayerParcelle.getFeature in localiser_parcelle on a postgis layer (after
excluding the code i have mentioned)

How did you use your application to get this problem out?
Would it be possible to make a simple test application that produces the
same behaviour?

It would be useful make a conversation about it on the mapserver IRC for
example. 
  

Thanks,

Tamas
  


-----Original Message-----
From: Xavier Mauclaire [mailto:xavier.mauclaire at geoter.fr] 
Sent: Wednesday, June 21, 2006 9:31 PM
To: 'Tamas Szekeres'
Cc: MAPSERVER-USERS at lists.umn.edu
Subject: RE: [UMN_MAPSERVER-USERS] Mapscript ,Mono, Apache and Linux : a
great story

 
Tamas
Do you think i may install an older version of mapserver, the 4.8.0 or other
one ?
I'm very annoyed
regards


-----------------------------------------
Xavier Mauclaire
-------------------------------------------------------

 

-----Message d'origine-----
De : Tamas Szekeres [mailto:szekerest at gmail.com] 
Envoyé : vendredi 16 juin 2006 15:57
À : Xavier Mauclaire
Cc : MAPSERVER-USERS at lists.umn.edu
Objet : Re: [UMN_MAPSERVER-USERS] Mapscript ,Mono, Apache and Linux : a
great story

Xavier,


> All the layerObj object i use  in my program are déclared in the 
> mapfile so i don't need to create layerObj from scratch using the
constructor.
> When you say that if a layerObj reference with a previously released 
> native memory segment, it may causing the error, what are the 
> consequences for my code ? Using the Dispose method is there the 
> solution to avoid this problem ?

Most of the mapscript classes implement the IDisposable interface since they
maintain unmanaged memory segments. It is a good practice to explicitly call
Dispose (or by the using directive) if a newly created object is not needed
any more. However you might want to maintain the mapObj reference for a
longer period and the disposing will occur during the program destruction.
Getting an existing object reference (eg. as returned by
GetLayerByName) does not create a new object, so calling dispose is not
needed.
All of the objects internally maintain a flag indicating if it should free
the internal memory during the finalization. So calling Dispose in the
previous case might also not cause any problems.

So you may not have to take care much of these issues the existing problems
may dedicated to unproper handling of this reference and considered to be
fixed. However it is not so easy to locate the reason of the problem since
the crash will be slipped out on a subsequent finalization or the program
termination.


>
> How can i get CVS code ?

http://mapserver.gis.umn.edu/development/cvs/

using Tortoise CVS is fairly straightforward.

> Why this code works well under windows and scratches under linux ?

You may use different frameworks and CRT libraries. The problem may still
exists but not manifested.


Tamas

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.2/372 - Release Date: 2006.06.21.
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.2/372 - Release Date: 2006.06.21.
 



More information about the MapServer-users mailing list