[fdo-users] SHPmodifications issue

Ytse bill_gfr at yahoo.fr
Tue Jan 30 03:38:56 EST 2007


Ok back after a while, just a mail to tell you that it's getting better now, I've read a couple sources on the web about memory leaks in .NET and I think I got rid of the main issue.
I still have not been able to step into the unmanaged code but I've added a trace (creation of a file) in ~ShpConnection and I confirm that I'm reaching this code.

Would that be a real nonsense though to try and execute CompressFileSets() in each ::Close() call ? 
the method begins with a test of mGlobalRefCount so you'd perform a useless test each time a connection is closed that is not the last one, but that would ensure that the compression is really performed as mentionned in the commentary, "triggered on the last connection close"

Of course it's better to ensure that the destruction of the object is performed, but at least you would not rely on it.

Anyway I'll have to perform additionnal volumetric tests but it seems alright now.

Thanks to you all for your support, hope I won't have to bother you again :)


----- Message d'origine ----
De : Greg Boone <greg.boone at autodesk.com>
À : Ytse <bill_gfr at yahoo.fr>; Dan Stoica <dan.stoica at autodesk.com>; fdo-users at lists.osgeo.org
Envoyé le : Mercredi, 24 Janvier 2007, 19h13mn 38s
Objet : RE: RE : RE: RE : RE: RE : RE: RE : RE: RE : RE: [fdo-users] SHPmodifications issue


Re: "Hum I'm sorry but I don't know how to step into the
unmanaged code, I can't go further than "

You need to change your debugging options in Dev Studio to allow debugging of unmanaged code.

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Ytse
Sent: Wednesday, January 24, 2007 12:36 PM
To: Dan Stoica; fdo-users at lists.osgeo.org
Subject: RE : RE: RE : RE: RE : RE: RE : RE: RE : RE: [fdo-users] SHPmodifications issue

Hum I'm sorry but I don't know how to step into the
unmanaged code, I can't go further than 

System::Void
NAMESPACE_OSGEO_FDO_CONNECTIONS::IConnectionImp::Close()
{
    EXCEPTION_HANDLER(GetImpObj()->Close())
}

in mgiconnectionimp.cpp

There probably is a leak somewhere as it works/fails
without logic : I can reproduce the same manipulation
several times in a row (delete all features but one)
and the result won't be the same.
The issue is probably somewhere in my code, I'll try
to find it by myself.

Now one last thing, I've talking about delete, update
is ok, but I have another issue with insert : 
the new features are seen by ArcView 3.2 but not by
Mapguide viewer 6.5 (which the users of my app are
using). Any idea ?
...


--- Dan Stoica <dan.stoica at autodesk.com> a écrit :

> 1) I'll drop this change, maybe today.
> 
> 2) place a breakpoint in
> ShpConnection::~ShpConnection (void):
> 
>     // Do files compression (get rid of the deleted
> rows)
>     CompressFileSets();
> 
> When your connection is released: 
> a) the desctuctor should be called
> b) CompressFileSets() should find mGlobalRefCount ==
> 1.
> 
> Cheers,
> Dan.
> 
> 
> -----Original Message-----
> From: Ytse [mailto:bill_gfr at yahoo.fr] 
> Sent: Wednesday, January 24, 2007 4:04 AM
> To: Dan Stoica; Robert Fortin; Pierre Dalcourt;
> fdo-users at lists.osgeo.org
> Subject: RE : RE: RE : RE: RE : RE: RE : RE:
> [fdo-users] SHP modifications issue
> 
> 1) Ok I'll change this right after writing this mail
> and I'll give it a go. Will you commit this
> correction
> or do I have to keep in mind that I might have to
> change this each time a new FDO version is released
> ?
> 
> 2) still hoping :)
> 
> I think I really need to have a closer look at the
> FDO
> internal, I can read C++ code but the thing is of
> course that I don't know where to start :)
> 
> thank you again
> 
> 
> --- Dan Stoica <dan.stoica at autodesk.com> a écrit :
> 
> > 1) have a look at:
> > 
> > /providers/SHP/src/ShpRead/DataRow.cpp line #75:
> > 
> >     else if (cVALID_RECORD_ID !=
> ((char*)buffer)[0])
> >         SetDeleted (true);
> > 
> > I have no problem changing it to:
> > 
> >     else if (cDELETED_RECORD_ID ==
> > ((char*)buffer)[0])
> >         SetDeleted (true);
> > 
> > 2) Good luck :-)
> > 
> > Dan.
> 
> 
> 
>     
> 
>     
>         
>
___________________________________________________________________________
> 
> Découvrez une nouvelle façon d'obtenir des réponses
> à toutes vos questions ! 
> Profitez des connaissances, des opinions et des
> expériences des internautes sur Yahoo!
> Questions/Réponses 
> http://fr.answers.yahoo.com
> 



    

    
        
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users


	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com


More information about the fdo-users mailing list