Archived
This forum has been archived. Please start a new discussion on GitHub.
When is IceInternal::LocalExceptionWrapper triggered?
Hi,
I am getting this error message from ICE:
This exception is not catched by a catch(const Ice::Exception& ex), but it is catched by a catch(...).
This exception is triggered when I create a direct proxy by checkedcast instruction and I wait for the conexion to be closed by ACM. The exception is triggered when I'm going to use the proxy.
Code sample:
I have tried to find information about IceInternal::LocalExceptionWrapper but I have not found anything.
I'm using ICE 3.4.0 in Ubuntu 10.04.
I would like to know:
1- When/why is this exception triggered?
2- Why this exception is not catched by a catch(const Ice::Exception& ex)?
Thanks in advance!!!
I am getting this error message from ICE:
terminate called after throwing an instance of 'IceInternal::LocalExceptionWrapper'
This exception is not catched by a catch(const Ice::Exception& ex), but it is catched by a catch(...).
This exception is triggered when I create a direct proxy by checkedcast instruction and I wait for the conexion to be closed by ACM. The exception is triggered when I'm going to use the proxy.
Code sample:
// Ice initialization int cl_argc = 4; char* cl_argv[4]; cl_argv[0] = (char*) "myapp"; cl_argv[1] = (char*) "--Ice.ACM.Client=4"; cl_argv[2] = (char*) "--Ice.Trace.Protocol=2"; cl_argv[3] = (char*) "--Ice.Trace.Network=3"; Ice::CommunicatorPtr iceComm; try { iceComm = Ice::initialize(cl_argc, cl_argv); } catch (const Ice::Exception& oops) { cout << "Ice environment: Ice Exception '" << oops << "'"; } DDLSIceServerInterfacePrx ddlsPrx = DDLSIceServerInterfacePrx::checkedCast(iceComm->stringToProxy("DDLSIceServer :default -h 10.30.101.111 -p 18001 -t 5000")); // down-cast from ObjectPrx to DDLSLocuazInterfacePrx sleep(8); string result = ddlsPrx->getsDRule("", "DEFAULT"); // This instruction is not executed, exception is raised.
I have tried to find information about IceInternal::LocalExceptionWrapper but I have not found anything.
I'm using ICE 3.4.0 in Ubuntu 10.04.
I would like to know:
1- When/why is this exception triggered?
2- Why this exception is not catched by a catch(const Ice::Exception& ex)?
Thanks in advance!!!
0
Comments
-
This is an internal exception, which should never escape to application code.
I'm afraid without further information, it is not possible to say what might be wrong. We are not aware of any problems in Ice that might cause this, which means that it might be a memory corruption. Do you have a complete example that demonstrates the problem?0 -
Also, what compiler version and what hardware are you using?0
-
Hi Marc!!!!
Thanks for your answer.
Our compiler is: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5).
Our hardware: Intel Core 2 Quad CPU Q9300 2.5Ghz - RAM 4Gb SO: 32b
This is the log of our program:-- 12/30/10 15:22:19.576 Network: trying to establish tcp connection to 10.30.101.111:18001 -- 12/30/10 15:22:19.602 Network: tcp connection established local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:19.603 Network: received 14 of 14 bytes via tcp local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:19.603 Protocol: received validate connection message type = 3 (validate connection) compression status = 0 (not compressed; do not compress response, if any) message size = 14 -- 12/30/10 15:22:19.605 Protocol: sending request message type = 0 (request) compression status = 0 (not compressed; do not compress response, if any) message size = 90 request id = 1 identity = DDLSIceServer facet = operation = ice_isA mode = 1 (nonmutating) context = -- 12/30/10 15:22:19.605 Network: sent 90 of 90 bytes via tcp local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:19.606 Network: received 14 of 14 bytes via tcp local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:19.606 Network: received 12 of 12 bytes via tcp local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:19.606 Protocol: received reply message type = 2 (reply) compression status = 0 (not compressed; do not compress response, if any) message size = 26 request id = 1 reply status = 0 (ok) General Locuaz::Locuaz() DDLS channel: Sleeping 8 seconds -- 12/30/10 15:22:24.570 Protocol: sending close connection message type = 4 (close connection) compression status = 1 (not compressed; compress response, if any) message size = 14 -- 12/30/10 15:22:24.570 Network: sent 14 of 14 bytes via tcp local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 -- 12/30/10 15:22:24.577 Network: closing tcp connection local address = 10.0.2.15:41078 remote address = 10.30.101.111:18001 General Locuaz::Locuaz() DDLS channel: calling to ddlsPrx->getsDRule terminate called after throwing an instance of 'IceInternal::LocalExceptionWrapper'
In next days we will try to send a complete example.
Thanks for all!!!!0 -
Another thing: all your tests (defining in allTests.py) are completed with successfull in our hardware.0
-
I noticed a minor issue with your code
argv should be terminated with a 0, it could cause problems with some compilers.
The correct code should be:int cl_argc = 4; char* cl_argv[cl_argc + 1]; cl_argv[0] = (char*) "myapp"; cl_argv[1] = (char*) "--Ice.ACM.Client=4"; cl_argv[2] = (char*) "--Ice.Trace.Protocol=2"; cl_argv[3] = (char*) "--Ice.Trace.Network=3"; cl_argv[4] = 0;
Not sure if that is causing the problem you are seeing, actually i will prefer to not write code like that to initialize the communicator.Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties.setProperty("Ice.ACM.Client", 4); .... Ice::CommunicatorPtr ic; try { ic = Ice::initialize(initData); } catch (const Ice::Exception& ex) { ... }
What Ice version are you using?0 -
Hi Jose!
I'm not at work now. But, in next week, I will change the code to use InitializationData.
Answering to your question, we are using ICE 3.4.0
Thanks for your answer, greetings from Seville :-) and happy new year to everybody.0 -
It will be good to update to 3.4.1, that is the latest release, we only provide free support for the latest release.
As 3.4.1 is binary compatible with 3.4.0 you don't need to change you code.
Happy new year0