[omniORB] limit on length of object IDs?

Carl Thompson cet@carlthompson.net
Mon, 08 Oct 2001 12:29:21 -0700


It looks like the problem is that string_to_ObjectId() is corrupting 
memory somehow.  Here is a code snippet:

   MyString oid_str = "1234567890123456789012345678901234567890";
   fprintf(stderr, "1 oid_str: %s\n", (const char *)oid_str);
   PortableServer::ObjectId_var oid =
     PortableServer::string_to_ObjectId((const char *)oid_str);
   fprintf(stderr, "2 oid_str: %s\n", (const char *)oid_str);
   CORBA::String_var t = PortableServer::ObjectId_to_string(oid);
   fprintf(stderr, "t: %s\n", (const char *)t);

And here is the resulting output:

   1 oid_str: 1234567890123456789012345678901234567890
   2 oid_str: 56789012345678907890(
   Segmentation fault

Anybody have a clue as to what is wrong?

Thanks,
Carl Thompson


Carl Thompson wrote:

> I should have mentioned that I am using omniORB4 from 10/1/2001. 
> Actually, it looks like the limit is 18 bytes as the maximum length of a 
> string used as an object ID (excluding null).  string_to_ObjectId() 
> works fine, but calling ObjectId_to_string() on the resulting ObjectId 
> chokes.  Ideally, I would like to create object IDs that might be as 
> much as a few hundred bytes long.  Is this not allowed?
> 
> Thanks,
> Carl Thompson
> 
> Carl Thompson wrote:
> 
>> Hello,
>>
>>      Is there a limit to the allowed length of object IDs?  I want to 
>> encode a lot of information about my persistent objects directly into 
>> their object IDs to minimize the accesses to persistent storage. 
>> However, I seem to not be able to use object IDs of greater than 16 
>> bytes or so with omniORB.  My favorite CORBA reference just says that 
>> object IDs are just a sequence of octets and does not mention any 
>> limits to the length of the sequence.  Does CORBA define a limit on 
>> the length or is this a bug in omniORB?
>>
>> Thank you,
>> Carl Thompson
>>
>>
> 
> 
>