Discussion:
[omniORB] omniORBpy python2.5 problem
Floris Bruynooghe
2007-04-25 19:50:57 UTC
Permalink
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:

***@signy:/tmp/sandbox$ nameclt list
***@signy:/tmp/sandbox$ python2.4 test.py
***@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
***@signy:/tmp/sandbox$ nameclt list
foo/
***@signy:/tmp/sandbox$ nameclt remove_context foo
***@signy:/tmp/sandbox$ python2.5 test.py
***@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)
***@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
Harri Pasanen
2007-04-25 20:38:53 UTC
Permalink
Post by Floris Bruynooghe
I've stumbled across a problem with the python bindings when
upgrading from python2.4 to python2.5.
You left out the omniORB version information. But based on your
description, likely you need to upgrade your omniORB as well.

-Harri


Privileged or confidential information may be contained in this message. If you are not the addressee of this message please notify the sender by return and thereafter delete the message, and you may not use, copy, disclose or rely on the information contained in it. Internet e-mail may be susceptible to data corruption, interception and unauthorised amendment for which Wall Street Systems does not accept liability. Whilst we have taken reasonable precautions to ensure that this e-mail and any attachments have been swept for viruses, Wall Street Systems does not accept liability for any damage sustained as a result of viruses. Statements in this message or attachments that do not relate to the business of Wall Street Systems are neither given nor endorsed by the company or its Directors.
Floris Bruynooghe
2007-04-25 21:01:08 UTC
Permalink
Post by Harri Pasanen
Post by Floris Bruynooghe
I've stumbled across a problem with the python bindings when
upgrading from python2.4 to python2.5.
You left out the omniORB version information. But based on your
description, likely you need to upgrade your omniORB as well.
Oops, sorry.
omniORB 4.0.6
omniORBpy 2.6

This is what Debian and Ubuntu ship. Is it worth upgrading to 4.1.0
and 3.0? Does the snippet I posted work correctly on them?

Cheers
Floris
--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
Duncan Grisby
2007-04-25 21:20:30 UTC
Permalink
Post by Floris Bruynooghe
Post by Harri Pasanen
Post by Floris Bruynooghe
I've stumbled across a problem with the python bindings when
upgrading from python2.4 to python2.5.
You left out the omniORB version information. But based on your
description, likely you need to upgrade your omniORB as well.
Oops, sorry.
omniORB 4.0.6
omniORBpy 2.6
With Python 2.5 you must use omniORBpy 3.0 (and therefore omniORB
4.1.0). Python 2.5 changed exceptions from old-style classes to
new-style ones, which broke omniORBpy 2.x.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Floris Bruynooghe
2007-04-25 22:08:56 UTC
Permalink
Post by Duncan Grisby
Post by Floris Bruynooghe
Post by Harri Pasanen
Post by Floris Bruynooghe
I've stumbled across a problem with the python bindings when
upgrading from python2.4 to python2.5.
You left out the omniORB version information. But based on your
description, likely you need to upgrade your omniORB as well.
Oops, sorry.
omniORB 4.0.6
omniORBpy 2.6
With Python 2.5 you must use omniORBpy 3.0 (and therefore omniORB
4.1.0). Python 2.5 changed exceptions from old-style classes to
new-style ones, which broke omniORBpy 2.x.
Thanks!
Floris
--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
Loading...