Re: g_assert problem in ORBit2-2.3.100 on Solaris...





Actually it was one of my co-workers that encountered this.
Fortunately I still have the ORB and everything compiled with
"-g" debug.

He followed the Orbit Beginners Tutorial link on Sorceforge to
an example.

http://icps.u-strasbg.fr/~genaud/ORBIT/

Look at the server at: http://icps.u-strasbg.fr/~genaud/ORBIT/x259.html


>On Thu, 20 Dec 2001 dahaverk@rockwellcollins.com wrote:
>
>> What is the purpose of the following "g_assert" ref: line 857 in poa.c
function "ORBIT_POA_create_object"?
>> (note: I am running ORBit2 on Solaris)
>
>    The purpose is to make sure that this object id was generated
>by the ORB. This is because the poa has the SYSTEM_ID policy ...
>
>
>> It looks to me like it would probably never be "TRUE".
>>
>> When I get to this g_assert my
>>
>> objid->_length = 13       // 12 Char's in _buffer + 1 for \nul
terminating char.
>> objid->_buffer = "myEchoServer"
>> objid->_release = '\0'
>> objid->_maximum = 0
>
>    You are generating the object id yourself here. You shouldn't
>be doing that :-)

Very true now that we've figured out that you can't create your own
object id.

[code snippet from server example]
int
 main (int argc, char *argv[])
 {
     PortableServer_ObjectId objid = {0, sizeof("myEchoString"), "myEchoString"};
     PortableServer_POA poa;

     CORBA_Environment ev;
     char *retval;
     CORBA_ORB orb;
     FILE * ofp;

     signal(SIGINT, exit);
     signal(SIGTERM, exit);

     CORBA_exception_init(ev);
     orb = CORBA_ORB_init(argc, argv, "orbit-local-orb", ev);

[...end code snippet...]

Originally Looking at section 1.26.2 this leads us to believe that ORBit
isn't quite following the C-Mapping rules for handling the Object ID as an
octet.

Today when I look at part of the description in 1.26.2 it looks like the
intent is that you should use the ORB provided functions to create an
ObjectID...
and not circumvent the ORB by directly creating the ObjectID.

your thoughts?

>    I'm curious about the code path that lead you here. Are you
>using a servant manager or something ?

Probably just a bad example that points out a weakness in the C-Mapping
spec.

Since it is undergoing revisions at the OMG...  Here's an opportunity to
improve things.

-Dave






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]