Hi All,<br><br>I have a problem, when i passing an interface object to a corbaobject i have:<br><br>idl:<br><br>module prova<br>{<br> interface inter<br> {<br> attribute string name;<br> };<br><br> interface inter2 <br>
{<br> string func(in inter obj); <br> };<br><br>}<br><br><br>client:<br><br><br> CORBA::Object_var obj = orb->string_to_object(argv[1]);<br><br> inter2_var operation=inter2::_narrow(obj);<br><br> if( CORBA::is_nil(operation) ) {<br>
cerr << "Can't narrow reference to type Echo (or it was nil)." << endl;<br> return 1;<br> }<br><br> obj = orb->resolve_initial_references("RootPOA");<br> PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);<br>
PortableServer::POAManager_var pman = poa->the_POAManager();<br> pman->activate();<br><br><br>prova_inter_impl * o=new prova_inter_impl ();<br><br>o->setName("RISC");<br><br>inter_ptr ok=o->_this();<br>
<br>operation->func(ok);<br><br>cout<<"FINE";<br><br>.....<br><br><br>server:<br><br>char * inter2::getName( prova::inter_ptr obj )<br>{<br> char *p=obj->name();<br><br> cout<<p<<endl<br>
<br> return p;<br>}<br><br><br>after a client run at the server print the name fine and after the client go in segfault why?<br><br>Thanks lots<br>Best Regards<br><br><br><br>