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 319738 - src/orca/atspi.py:child needs to be more careful about indeces out of bounds
src/orca/atspi.py:child needs to be more careful about indeces out of bounds
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-25 14:15 UTC by Willie Walker
Modified: 2006-08-01 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the problem. (1.03 KB, patch)
2006-08-01 17:18 UTC, Rich Burridge
none Details | Review
New version of the patch that raises an exception if child at given index is invalid. (1.59 KB, patch)
2006-08-01 18:07 UTC, Rich Burridge
accepted-commit_now Details | Review

Description Willie Walker 2005-10-25 14:15:10 UTC
The "child" function could fail under two conditions: 1) an invalid index is
passed to the child function, and/or the AT-SPI fails in some way (i.e., the
AT-SPI implementation is broken or the child has since disappeared from the
hierarchy).
Comment 1 Rich Burridge 2006-06-27 22:42:25 UTC
a11y.py no longer exists. The function is question is now
in atspi.py:

      def child(self, index): 
Comment 2 Rich Burridge 2006-08-01 17:18:08 UTC
Created attachment 70038 [details] [review]
Patch to fix the problem.

Will, are you looking for anything else in the child() routine
apart from this?
Comment 3 Willie Walker 2006-08-01 17:46:45 UTC
We're doing a better job of percolating COMM_FAILUREs and other exceptions up to focus_tracking_presenter and handling them there, so I think many of our concerns are handled that way.  The only concern I have about returning None here is that a lot of the rest of code in Orca expects a non-None value to be returned.  It might be better to throw an exception here and have it be caught higher up (e.g., focus_tracking_presenter).  What do you think?
Comment 4 Rich Burridge 2006-08-01 18:07:45 UTC
Created attachment 70040 [details] [review]
New version of the patch that raises an exception if child at given index is invalid.

Will, how does this one look?
Comment 5 Willie Walker 2006-08-01 19:26:31 UTC
Wonderful!  Thanks.
Comment 6 Rich Burridge 2006-08-01 21:11:36 UTC
Changes checked into CVS HEAD. Closing as fixed.