[omniORB] Storing CORBA::TypeCodes
Judy Anderson
yduj@harlequin.com
Mon, 1 Mar 99 18:09:33 EST
My application passes any's around a lot, and it also passes type
codes around. It turns out that in OmniOrb, if I pass the type code
CORBA::_tc_ulong, then it seems to be fine, but if I pass in
CORBA::_tc_string, then bad things happen.
I have a test program which I could send around to people if they
would be interested in seeing the problem (I have to leave soon, and
packaging it up might take more than the time I have available, but I
could do so tomorrow if it would be helpful.) It may well be that it's
our fault in not using these type codes properly, or that we should be
rewriting our program to use the enum's (tk_ulong, tk_string) instead
to indicate the things we have been using type codes for. In
particular, the way in which the failure manifests is that we save the
type code passed in, and it is the later use of this save type code
that causes the problem. It is possible that we need to do something
special to copy the type code and make sure that memory is allocated
properly -- the CORBA memory allocation rules and the C++ memory
allocation rules can be confusing.
The problem that's caused is pretty strange: I can't figure out
exactly what exception is being initially raised, but it ends up in a
catch handler for CORBA::WRONG_TRANSACTION (why, I don't understand at
all), and eventually throws out of that, and then apparently something
bad happens on the way out of that throw, and the client catches a
communications failure exception.
Is anybody familiar with problems involving passing type codes from
clients to server, and then using those type codes later in the
server? Our application works fine under orbix, but of course it
probably implements its type codes in a different way.
I am using Windows NT 4.0 with Visual C++ 5.0 on a Pentium.
Judy Anderson "yduJ"
yduJ@harlequin.com
617-374-2547