[omniORB] omniORBpy python2.5 problem

Floris Bruynooghe floris.bruynooghe at gmail.com
Wed Apr 25 15:51:05 BST 2007


Hi

I've stumbled across a problem with the python bindings when upgrading
from python2.4 to python2.5.  Consider the following short bit of
code:

"""
# test.py
import CosNaming
import CORBA

orb = CORBA.ORB_init([], CORBA.ORB_ID)
root_context = orb.resolve_initial_references('NameService')
root_context = root_context._narrow(CosNaming.NamingContext)
name = [CosNaming.NameComponent('foo', '')]
context = root_context.bind_new_context(name)
"""

And running it in the following way:

flub at signy:/tmp/sandbox$ nameclt list
flub at signy:/tmp/sandbox$ python2.4 test.py
flub at signy:/tmp/sandbox$ python2.4 test.py
Traceback (most recent call last):
  File "test.py", line 9, in ?
    context = root_context.bind_new_context(name)
  File "/usr/lib/python2.4/site-packages/CosNaming_idl.py", line 224,
in bind_new_context
    return _omnipy.invoke(self, "bind_new_context",
_0_CosNaming.NamingContext._d_bind_new_context, args)
CosNaming.AlreadyBound: User exception with no members
flub at signy:/tmp/sandbox$ nameclt list
foo/
flub at signy:/tmp/sandbox$ nameclt remove_context foo
flub at signy:/tmp/sandbox$ python2.5 test.py
flub at signy:/tmp/sandbox$ python2.5 test.py
omniORB: Assertion failed.  This indicates a bug in the application using
omniORB, or maybe in omniORB itself.
 file: ../../modules/pyExceptions.cc
 line: 421
 info: PyClass_Check(excclass)
terminate called after throwing an instance of 'omniORB::fatalException'
Aborted (core dumped)
flub at signy:/tmp/sandbox$

I really prefer the python2.4 behaviour where I get a nice exception
instead of a core dump... :-)  Am I correct in assuming this is a
problem with omniORBpy?  And are there any hints at how to solve this?

Thanks
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org



More information about the omniORB-list mailing list