[omniORB] VC++ 5: omniORB client: Destructor called twice a fter throw!!!

David Morgenlender dmorgen@alum.mit.edu
Thu, 15 Oct 1998 22:27:35 GMT


Dietmar,

>This appears to be similar to a problem which was reported back in
>September. Essentially, if an exception is thrown from within an
>incompletely constructed object (ie., in the constructor), the
>destructor of the object is called twice, in our case once with an
>INVALID pointer. Details of our report, and Randy Stroup's response are
>attached.

That's not what's happening here.  In my case, I'm catching an exception =
with a
"catch(...)", then calling a function which does a "throw" & many =
catches.  I
suspect the catch any & rethrow is the cause of the problem.  There are =
no
exceptions thrown in constructors.

IAE, thanks for this info.  I'm going to read it in detail to see if it =
will
point the way towards a solution.  One problem I have though ... the =
exception
classes are all exceptions passed from CORBA Server to Client, i.e. in =
code
generated by the IDL compiler ... so I can't modify it in any =
maintainable way.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D