Hi, I'm trying to create an object (CORBA::Object_ptr foo_obj = new CORBA::Object) then make a narrow in a not convenient IDL type raises a SIGSEGV segmentation due to a strcmp with null argument (repoid) in the following Mico generated code (if (!strcmp (_obj->_repoid(), "IDL:HelloWorld:1.0") || _obj->_is_a_remote ("IDL:HelloWorld:1.0"))) :
If _obj hasn't any repoid and is not typed HelloWorld, the following code will be faulty: HelloWorld_ptr HelloWorld::_narrow( CORBA::Object_ptr _obj ) { HelloWorld_ptr _o; if( !CORBA::is_nil( _obj ) ) { void *_p; if( (_p = _obj->_narrow_helper( "IDL:HelloWorld:1.0" ))) return _duplicate( (HelloWorld_ptr) _p ); if (!strcmp (_obj->_repoid(), "IDL:HelloWorld:1.0") || _obj->_is_a_remote ("IDL:HelloWorld:1.0")) { _o = new HelloWorld_stub; _o->CORBA::Object::operator=( *_obj ); return _o; } } return _nil(); } I would expect a _nil reference returned instead of a SIGSEGV segmentation fault. Can I have a better solution than building a "dummy" non-empty string to be returned by the _repoid() function in object.cc file ? ... return ior ? ... : CORBA::string_dup( "dummy_string" ); ... Thanks for all.
_______________________________________________ Mico-devel mailing list Mico-devel@mico.org http://www.mico.org/mailman/listinfo/mico-devel