After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 468636 - pyspi throws corba errors from getChildAtIndex
pyspi throws corba errors from getChildAtIndex
Status: RESOLVED FIXED
Product: pyspi
Classification: Deprecated
Component: general
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: PySPI Maintainers
PySPI Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-08-20 19:42 UTC by Cole Robinson
Modified: 2008-03-06 02:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Catch the offending exception and continue as though the call failed. (510 bytes, patch)
2007-08-20 19:53 UTC, Cole Robinson
committed Details | Review

Description Cole Robinson 2007-08-20 19:42:38 UTC
I see the following when trying to run the dogtail sniff application on Fedora 7, using dogtail and pyspi built from upstream source:

[root@crobinso1 pyspi.orig]# sniff
Creating logfile at /tmp/dogtail/logs/sniff_20070820-152941_debug ...
Detecting distribution: Fedora (or derived distribution)
GTK Accessibility Module initialized
Traceback (most recent call last):
  • File "/usr/bin/sniff", line 10 in <module>
    from dogtail import tree
  • File "/usr/lib/python2.5/site-packages/dogtail/tree.py", line 1263 in <module>
    children = root.children
  • File "/usr/lib/python2.5/site-packages/dogtail/tree.py", line 476 in __getattr__
    try: a = self.__accessible.getChildAtIndex (i)
  • File "pyspi.pyx", line 498 in atspi.Accessible.getChildAtIndex
    spiChild = cspi.Accessible_getChildAtIndex (self.__item, i)
  • File "pyspi.pyx", line 146 in atspi.exception_handler
    raise str(e) Non-fatal SPIException: type:0 source:0 "IDL:omg.org/CORBA/COMM_FAILURE:1.0"
TypeError: exceptions must be strings, classes, or instances, not SpiException

I changed the source to print a string version of the exception (can be seen as raise str(e) above) in the interim to get useful feedback, but this change does not impact the source of the problem. Info on this bug is being tracked in:

http://bugzilla.gnome.org/show_bug.cgi?id=440887
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=245733
Comment 1 Cole Robinson 2007-08-20 19:53:23 UTC
Created attachment 94016 [details] [review]
Catch the offending exception and continue as though the call failed.

The attached patch is a workaround for the problem: it catches the exception being thrown and sets the child object to NULL. This essentially causes the scan to skip this entry. sniff works fine after this patch is applied and built.

This probably isn't the nicest way to go about it, but it makes things work!
Comment 2 Zack Cerza 2007-08-20 20:28:46 UTC
Is this actually causing sniff to bail, or is it just printed in the terminal?
Comment 3 Cole Robinson 2007-08-21 13:32:10 UTC
It blocks all pyspi use. Even though it says 'non-fatal' the exception handler doesn't differentiate and just raises the exception, causing pyspi to stop in its tracks.
Comment 4 Zack Cerza 2007-08-21 17:31:56 UTC
Your patch seems correct, but it doesn't stop sniff from bailing due to the pyspi problem mentioned in bug #440887. :(
Comment 5 Zack Cerza 2007-08-21 18:06:27 UTC
Committed. Thanks!
Comment 6 Cole Robinson 2007-08-21 19:54:14 UTC
Whoops. Yeah #440887 is definitely a different error, I didn't examine the traceback close enough. I think the root of the redhat bz should be addressed now though, as it was erroring in getChildAtIndex, as was this bug.
Comment 7 Bhaskar Mukkamala 2008-03-06 02:40:19 UTC
Dogtail was running alright and I hit this error suddenly while trying to automate RealPlayer.

I understand the patch but what is workaround for this issue?

How do we come out of this problem.?

How do we comeout

(In reply to comment #6)
> Whoops. Yeah #440887 is definitely a different error, I didn't examine the
> traceback close enough. I think the root of the redhat bz should be addressed
> now though, as it was erroring in getChildAtIndex, as was this bug.