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 435833 - Relation::getTarget should specify return as Accessible, not Object
Relation::getTarget should specify return as Accessible, not Object
Product: at-spi
Classification: Platform
Component: api
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks: 478129
Reported: 2007-05-04 14:19 UTC by Peter Parente
Modified: 2014-11-13 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---

patch (983 bytes, patch)
2007-11-28 07:42 UTC, Li Yuan
none Details | Review
patch2 (331 bytes, patch)
2007-11-28 07:59 UTC, Li Yuan
none Details | Review
Patch to narrow before ref'ing (539 bytes, patch)
2008-06-24 15:48 UTC, Willie Walker
committed Details | Review
Patch to narrow only if needed (1.01 KB, patch)
2008-06-26 21:34 UTC, Willie Walker
committed Details | Review

Description Peter Parente 2007-05-04 14:19:45 UTC
Here's the current documentation for the method:

=== begin doc ===
Object Accessibility::Relation::getTarget(in short index)
    an Object which is the 'nth'target of this Relation, e.g. the Object at index i in the list of Objects having the specified relationship to this Accessible. 

    This target should always implement Accessible, though it is returned as an Object. (In this respect this method is probably ill-specified.)
=== end doc ===

The doc itself admits the return type should always be an Accessible, not a plain Object. Is there are reason why we can't change the spec to fix this loop hole?
Comment 1 Eitan Isaacson 2007-09-18 17:48:16 UTC
For some reason or other this seems to especially be a problem with Java's bridge.
Is there any chance we could fix this?
Comment 2 Li Yuan 2007-11-28 07:42:23 UTC
Created attachment 99756 [details] [review]
Comment 3 Li Yuan 2007-11-28 07:44:09 UTC
What problem does Java's bridge have? Do we need a new bug for it?
Comment 4 Li Yuan 2007-11-28 07:59:25 UTC
Created attachment 99760 [details] [review]
Comment 5 Li Yuan 2007-11-28 08:21:43 UTC
I just found that Accessibility_Accessible.idl has included Accessibility_Relation.idl. I think that's why getTarget doesn't return an Accessible.
Comment 6 Li Yuan 2007-11-28 08:28:14 UTC
I don't have a good fix about this bug. Any suggestion?
Comment 7 Willie Walker 2008-06-24 15:48:27 UTC
Created attachment 113345 [details] [review]
Patch to narrow before ref'ing

When working with JRadioButtons, I noticed the following Traceback in Orca:

  • File "/usr/lib/python2.4/site-packages/pyatspi/", line 656 in getTarget
AttributeError: 'CORBA.Object' object has no attribute 'ref'

ref is part of the Bonobo_Unknown object.  So...I think it might be necessary to do the narrow first.  This patch does that and makes my woes go away.
Comment 8 Willie Walker 2008-06-25 17:03:16 UTC
Patch committed to trunk and gnome-2-22 branch.  Thanks!
Comment 9 Joanmarie Diggs (IRC: joanie) 2008-06-26 19:06:36 UTC
Will I believe this patch is responsible for a regression.  When I use Orca to tab among items in the Pidgin preferences dialog, Orca speaks nothing.  Prior to this check in, Orca speaks the objects as expected.
Comment 10 Willie Walker 2008-06-26 21:34:15 UTC
Created attachment 113489 [details] [review]
Patch to narrow only if needed

Here's a patch to narrow the accessible on if it's not an accessible.  Tested with pidgin and SwingSet.  Seems to work.  Committed to trunk and branch.
Comment 11 André Klapper 2012-02-26 10:41:59 UTC
[Resetting QA Contact to newly introduced "at-spi-maint@gnome.bugs". 
Reason: So far it was impossible to watch changes in at-spi bug reports without following all the specific persons (Li Yuan, Bill Haneman, Jeff Wai, ...) and also their activity outside of at-spi reports.

IMPORTANT: Anyone interested in following all bug activity (including all maintainers) must watch the "at-spi-maint@gnome.bugs" dummy user by adding it to the 'Users to watch' list under Preferences->Email preferences. This is also the default procedure nowadays in GNOME when setting up new products.]
Comment 12 André Klapper 2013-08-14 10:04:53 UTC
[Mass-resetting default assignee, see bug 705890. Please reclaim this bug report by setting the assignee to yourself if you still plan to work on this. Thanks!]
Comment 13 Magdalen Berns (irc magpie) 2014-11-13 14:31:13 UTC
I'm going to go ahead and close this because it concerns a very old version and it seems to have committed patches which suggests the problem was fixed at the time and somebody forgot to close the bug.

Feel free to open a new bug if the problem persists.