Archived

This forum has been archived. Please start a new discussion on GitHub.

terminate called after throwing an instance of 'Ice::ObjectNotExistException'

Hi,

I am using Ice 3.2.1 with C++

After calling a remote function using a proxy to an object that might or might not be hosted at an Object Adapter, the program terminates, although I am catching and ignoring all exceptions.

Here's the client-side code.

try {
int moteData=this->myPrx->getData1();
...
...
}
catch(...)
{
//don't care, go on
cout<<"Ice exception"<<endl;
}

The server-side code eliminates the servant using OA->remove(IceID).

I don't know why terminate is called, since I need to either ignore it or react to the exception.

Thank you in advance

Comments

  • matthew
    matthew NL, Canada
    Its not clear to me why you get this exception. I suspect you'll find that the problem lies somewhere in your code. To confirm this you could modify the hello world demo that comes with the Ice distribution. In demo/Ice/hello/config.client change

    Hello.Proxy=hello:tcp -p 10000:udp -p 10000:ssl -p 10001

    to

    Hello.Proxy=helloX:tcp -p 10000:udp -p 10000:ssl -p 10001

    Then run the client. You should get an ObjectNotExistException like so:

    august:hello matthew$ ./client
    ./client: Outgoing.cpp:422: Ice::ObjectNotExistException:
    object does not exist:
    identity: `helloX'
    facet:
    operation: ice_isA

    If you cannot work out what is causing your problem you should:
    - Upgrade to Ice 3.3 (we do not provide free support for older versions of Ice on these forums).
    - Create a complete, self-compilable example that demonstrates your problem and attach it to this thread.
  • I found out that the program is only terminated at some points in the program, if I call a function of a non-existent proxy. E.g. At main(), just after creating the object adapter, and adding the servant to it. If I remove it again from the object adapter and call a function at its proxy, I just get the normal exception with no crash.

    I just cannot find out why at other points of the program it terminates. I might have something to do with the fact that I use many threads. I also tried to reproduce the problem with another small program but It didn't work, I just got the normal exceptions.

    I will continue trying to find the error, and reproduce it with Ice 3.3. Anyway here is the stack trace. Thank you for your help.

    gdb/mi (7/14/08 5:21 PM) (Suspended)
    Thread [1] (Suspended)
    Thread [2] (Suspended)
    Thread [3] (Suspended)
    Thread [4] (Suspended)
    Thread [5] (Suspended)
    Thread [6] (Suspended: Signal 'SIGABRT' received. Description: aborted.)
    16 __kernel_vsyscall() 0xffffe410
    15 raise() 0xb7a97df0
    14 abort() 0xb7a99641
    13 __gnu_cxx::__verbose_terminate_handler() 0xb7c9a270
    12 <symbol is not available> 0xb7c97ca5
    11 std::terminate() 0xb7c97ce2
    10 __cxa_throw() 0xb7c97e1a
    9 Ice::ObjectNotExistException::ice_throw() Ice-3.2.1/src/Ice/LocalException.cpp:936 0xb7ea2cea
    8 IceInternal::ProxyFactory::checkRetryAfterException() Ice-3.2.1/Ice-3.2.1/src/Ice/ProxyFactory.cpp:139 0xb7efd721
    7 IceProxy::Ice::Object::__handleException() Ice-3.2.1/src/Ice/Proxy.cpp:956 0xb7f02dc4
    6 IceProxy::sensorNetwork::SensorMote::getData1()
    5 IceProxy::sensorNetwork::SensorMote::getData1()
    4 SensorMotesHolder::parseMoteMessage()
    3 serialPortListen()
    2 start_thread() 0xb7cd231b
    1 clone() 0xb7b3d57e
    Thread [7] (Suspended)
    Thread [8] (Suspended)
    gdb (7/14/08 5:21 PM)


    terminate called after throwing an instance of 'Ice::ObjectNotExistException'
    what(): N3Ice23ObjectNotExistExceptionE