[omniORB] Bug in inheritance across namespaces.
Frank Lynch
flynch@emhain.wit.ie
Mon, 26 Apr 1999 12:23:25 +0100 (IST)
> What I could do better is to document this bug and suggest workaround on
> our web page. If you can write me a concise summary of what is the IDL and
> what workaround should be put into the stub manually, I would put it on
> our web page to make the info more accessible.
The issue that I have encountered appears to be a different one to what
Dietmar had, I have however tracked down the "bug" in the generated code
and have a workaround (which involves modifing the generated code).
The situation is that we have the following IDL:
module X {
interface foo{
void someOp();
};
interface bar{
foo factory();
};
};
module Y {
interface foo : X:foo {
void anotherOp();
};
};
In ther server, the method X::bar::factory is implemented as follows
X::foo_ptr X_i::bar_i()
{
Y_i::foo_i f;
return Y::foo::_duplicate(&f);
}
A client using MSVC++5/6 will crash in the generated stub code (when
they attempt to unmarshal the response from this method).
omniIDL2 generates the following code:
X::foo_ptr X::foo_Helper::unmarshalObjRef(NetBufferStream &s) {
return X::foo::unmarshalObjRef(s);
}
the call unmarshalObjRef(s) causes the crash, as infact its a Y::foo
object that it is attempting to unmarshal. So if you are using MSVC++5/6
you need to change it to the following:
X::foo_ptr X::foo_Helper::unmarshalObjRef(NetBufferStream &s) {
return Y::foo::unmarshalObjRef(s);
}
I have NOT attempted to patch the IDL compiler to cater for this. I'll
leave that to someone much braver :-) I hope thats enough information, if
you want I can send you a simple test case.
Regards,
Frank Lynch.
> Back to the inheritance namespace bug, we have put the fix Dietmar May has
> suggested for the special case he mentioned. It is an ugly workaround I do
> not want to be used for a general case.
So I take it that Dietmar's patch will not become part of the source of
omniORB on the Win32 platform?
PS We have been developing an event service here, and this issue has been
blocking its release for some time. I will email later this week to let
and let you know when its available. But for the moment you can check out
the preformance times of our event service against omniEvents and
OrbixEvents at http://emhain.wit.ie/~p98ac18 and click on the about
button.