When is IceInternal::LocalExceptionWrapper triggered?

in Bug Reports
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
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?
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:
In next days we will try to send a complete example.
Thanks for all!!!!
argv should be terminated with a 0, it could cause problems with some compilers.
The correct code should be:
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.
What Ice version are you using?
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.
As 3.4.1 is binary compatible with 3.4.0 you don't need to change you code.
Happy new year