[omniORB] error messages

Stefan Seefeld seefelds@MAGELLAN.UMontreal.CA
Fri, 15 Sep 2000 09:36:38 -0400


Stefan Seefeld wrote:
> 
> I'm debugging a program which produces the following
> output:
> 
> omniORB: ERROR -- A servant has been deleted that is still activated.
>  repo id:
>       id: root<1996881920>

I'v finally found the problem. I found it sufficiently ammusing to
mail it to the list. I use the Subject/Observer pattern; here is
the destructor of an observer:

DynamicFrame::~DynamicFrame()
{
  Trace trace("DynamicFrame::~DynamicFrame");
  if (!CORBA::is_nil(telltale))
    try { telltale->detach(Observer_var(_this()));}
    catch (const CORBA::OBJECT_NOT_EXIST &) {}
  delete renderer1;
  delete renderer2;
}

Now remember that the the object is deleted after deactivation. This means
that the '_this()' method I invoke in the third line is invoked on a non-activated
object, leading to an implicit activation with the default POA. This then
results in the error I observed.

All I tried to do was to unregister 'this' from the Subject it was observing.
Obviously, this isn't possible, at least not if this requires a reference to 
'this'...

Of course, the right thing to do would be to explicitely detach 'this' from the
subject *before* I deactivate it. However, I'm trying to make the server fault
tolerant, i.e. to assure that even if the client gets killed, all resources
which were allocated on behalf of the client are correctly released.

Best regards,	Stefan
_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...