[fdo-users] ArcSDE: Another serious bug (general C++ trap)
Oyvind Idland
oyvind.idland at gmail.com
Tue Mar 1 02:34:32 EST 2011
I'll look into it when I'm done with the current patch (geometry issues +
related cleanup)
-- Oyvind
On Mon, Feb 28, 2011 at 5:07 PM, Greg Boone <greg.boone at autodesk.com> wrote:
> Hi Oyvind,
>
>
>
> Please log a Trac ticket and attach a patch with your recommended changes.
>
>
>
> Regards,
>
> Greg
>
>
>
> *From:* fdo-users-bounces at lists.osgeo.org [mailto:
> fdo-users-bounces at lists.osgeo.org] *On Behalf Of *Traian Stanev
> *Sent:* Monday, February 28, 2011 10:59 AM
>
> *To:* 'FDO Users Mail List'
> *Subject:* RE: [fdo-users] ArcSDE: Another serious bug (general C++ trap)
>
>
>
>
>
> In fact, in C++ it will not initialize the object, unlike e.g. Java.
>
>
>
> As the poster said, it will construct an ArcSDEFilterToSQL in the local
> scope and then return, with the object the caller wanted to initialize being
> left uninitialized. It’s a serious bug if that constructor is ever used.
>
>
>
> Traian
>
>
>
>
>
> *From:* fdo-users-bounces at lists.osgeo.org [mailto:
> fdo-users-bounces at lists.osgeo.org] *On Behalf Of *Greg Boone
> *Sent:* Monday, February 28, 2011 10:27 AM
> *To:* FDO Users Mail List
> *Subject:* RE: [fdo-users] ArcSDE: Another serious bug (general C++ trap)
>
>
>
> This looks like a good area for refactoring. I agree that having the
> default constructor call the non-default constructor is not the best
> approach.
>
>
>
> Greg
>
>
>
> *From:* fdo-users-bounces at lists.osgeo.org [mailto:
> fdo-users-bounces at lists.osgeo.org] *On Behalf Of *Oyvind Idland
> *Sent:* Monday, February 28, 2011 7:41 AM
> *To:* FDO Users Mail List
> *Subject:* [fdo-users] ArcSDE: Another serious bug (general C++ trap)
>
>
>
> In the definition of ArcSDEFilterToSql (in ArcSDEFilterToSQL.h), there are
> two
> constructors:
>
> ArcSDEFilterToSql() { ArcSDEFilterToSql(NULL, NULL); } // 0-argument
> constructor to please FdoPtr::operator->
>
> ArcSDEFilterToSql (ArcSDEConnection *conn, FdoClassDefinition*
> definition);
>
>
> The first one with no arguments will not work, in fact, it will just
> allocate another instance of itself and return.
>
> There is, as far as I know, no way to make a constructor call another
> constructor in C++. Instead, an init() method
> must be implemented.
>
> I don't know if this constructor has ever been used, I just saw it while
> refactoring code.. but I am a bit worried if
> this has been done several places.
>
>
> -- Oyvind
>
>
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20110301/f487d577/attachment.html
More information about the fdo-users
mailing list