[omniORB] issues with omniorb(py) on solaris

Tim Docker timd at macquarie.com.au
Fri Dec 9 11:12:02 GMT 2005


Hi,

I am having problems using omniorbpy under solaris. The
software versions are:

    solaris   2.8
    omniorb   4.0.6
    omniorbpy 2.6
    python    2.4.1
    gcc       3.4.3

    gcc-flags -O2


The problem I am seeing is that there is some sort of alignment
error with sequences of doubles. As you can see below, the server
recieves the sequence incorrectly from the client, and the sequence
is further corrupted on transfer back to client.

The code works as intended under linux.

Has this been seen before? Can anyone provide any pointers to what
might be the problem? We have used older versions of omniorb (with older
compilers) under solaris in the past without problem.

Many thanks,

Tim

----------------------------------------------------------------------
tcc6:orbtest $ cat test.idl
// compile with omniidl -bpython test.idl

module Test
{
    typedef sequence<double> DoubleSeq;

    interface EchoBox
    {
        DoubleSeq echo( in DoubleSeq v );
    };
};

----------------------------------------------------------------------
tcc6:orbtest $ cat test_server.py
import sys
from omniORB import CORBA
import Test, Test__POA

class EchoBox_impl(Test__POA.EchoBox):

    def echo(self,v):
        print "received %s" % v
        return v

def main(argv):
    orb = CORBA.ORB_init(argv, CORBA.ORB_ID)
    poa = orb.resolve_initial_references( "RootPOA" )
    poaManager = poa._get_the_POAManager()
    poaManager.activate()

    objref = EchoBox_impl()._this()
    print orb.object_to_string(objref)
    orb.run()

main(sys.argv)

----------------------------------------------------------------------
tcc6:orbtest $ cat test_client.py
import sys
from omniORB import CORBA
import Test, Test__POA

def main(argv):
    orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
    poa = orb.resolve_initial_references("RootPOA")
    poa._get_the_POAManager().activate()

    o = orb.string_to_object(sys.argv[1])

    v = [1,2,3,4]
    print "sending %s" % v
    v = o.echo( v )
    print "received %s" % v


main(sys.argv)

----------------------------------------------------------------------
tcc6:orbtest $ ./test_server.sh
IOR:00000000000000...
received [4.1338939523121024e-308, 1.0, 2.0, 3.0]

----------------------------------------------------------------------
tcc6:orbtest $ ./test_client.sh IOR:00000000000000...
sending [1, 2, 3, 4]
received [0.0, 4.1338939523121024e-308, 1.0, 2.0]



More information about the omniORB-list mailing list