Re: Abort at program end



Marc Siegel wrote:

Well, the main() is so simple for this client at this stage, I 'll just paste it below. As far as I can tell, there wasnt enough done here to unref things additional times or anything like that, but if you spot a problem please tell me.

The problem is that ORB::destroy() is not getting called on the ORB object. Other ORB implementations do this for you automatically. We don't. I'll see if I can fix this. I doubt it will be as easy as it sounds. If you add an orb->destroy() your code will not assert. Except you need to clean up all your references (destruct all your _var's) before you call destroy. One way to achieve this is with blocks:

{
   ORB_var orb = ...
   {
      Object_var obj = ...
   }
   orb->destroy();
}

Even easier than that is to not clean up and change the ORB_var to an ORB_ptr. It's always a good idea to try and clean up though.


ALSO - notice that I am reading the IOR file into a string to get the ref. This is a more minor nit, but the other ORB's support the the file:// notation for passing IOR refs and read in the files themselves.

Can't help you there. If the C binding doesn't support it, the C++ binding doesn't either. The C++ binding is just a wrapper.


ALSO - if the .ref file is not present, this program exits with "Aborted", which I assume means an uncaught exception. I think the correct behavior, as exhibited by the other ORB's, is to return a CORBA nil object so that the if-block below will function.

Yes the Aborted is going to be an uncaught exception. As for the behaviour of string_to_object in the when there is a bad IOR passed it looks like the right thing to do is throw a BAD_PARAM which is what MICO does and backed up by the following doc:

http://edocs.bea.com/tuxedo/tux81/CORBA_ref/corba_67.htm


--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]