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 360272 - COMM_FAILUREs narrowing JTextField objects
COMM_FAILUREs narrowing JTextField objects
Status: RESOLVED WONTFIX
Product: pyorbit
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: Python bindings maintainers
Python bindings maintainers
gnome[unmaintained]
: 449220 (view as bug list)
Depends on:
Blocks: 350742
 
 
Reported: 2006-10-06 21:09 UTC by Lynn Monsanto
Modified: 2014-08-02 12:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
python script to reproduce bug (18.58 KB, text/plain)
2006-10-06 21:12 UTC, Lynn Monsanto
Details

Description Lynn Monsanto 2006-10-06 21:09:37 UTC
When a text focus event is received from the registry, the event source first needs to be narrowed to an Accessible

    obj = event.source._narrow(Accessibility.Accessible)

Next, the Accessible object needs to be narrowed to an AccessibleText

    text = obj.queryInterface("IDL:Accessibility/Text:1.0)

Finally, the resulting object needs to be narrowed again

    text = text._narrow(Accessibility.Text)

COMM_FAILURE exceptions frequently occur at this last step for JTextFields, but not other text objects like JTextAreas.  

To duplicate this problem, run the demo/jfc/Notepad demo in J2SE 1.5.0. The gnome-access-bridge needs to be installed on the JDK.

Next run the attached python script. You will notice the script prints the appropriate text information for Notepad's JTextArea, but fails with a COMM_FAILURE for any of the JTextFields (e.g., filename in the open file dialog).
Comment 1 Lynn Monsanto 2006-10-06 21:12:11 UTC
Created attachment 74184 [details]
python script to reproduce bug

This is a python script to reproduce the bug with the J2SE 1.5.0 Notepad demo application
Comment 2 Lynn Monsanto 2006-11-10 18:56:26 UTC
added blocked keyword to synopsis
Comment 3 Lynn Monsanto 2006-11-10 19:38:49 UTC
Removed bogus blocked keyword.
Comment 4 Lynn Monsanto 2007-01-25 20:49:30 UTC
Hi Padraig,

Would you take a look at this bug.  Thanks!

Lynn
Comment 5 Harry Lu 2007-02-05 06:26:58 UTC
Add CC to gnome-a11y-bugs-ext@sun.com
Comment 6 Lynn Monsanto 2007-02-12 19:34:22 UTC
Harry,

Do I understand correctly that you are the right person to discuss this bug with?

Lynn
Comment 7 Harry Lu 2007-02-13 02:22:27 UTC
jeff.cai@sun.com will take a look at this bug. Please discuss with him.
Comment 8 Jeff Cai 2007-03-21 10:37:59 UTC
I used demo/jfc/TableExample as my target instead of Notepad because JavaBridge has a bug that "string out of index". This is another problem so I put it aside.

TableExample has a dialog "Connection Information" which contains four JTextField widgets. When you switch among them, the python script you give me will report "COMM_FAILURE" in one of them. But for other three ones, it is ok.

I change the code of simple-at, a test program in c code, to make it work just like the python script, the test result is ok.

python output:

notifyEvent focus: 0 0
source:  <CORBA.Object '(null)' at 0x822a878>
name=None role='text' state='EDITABLE ENABLED FOCUSABLE FOCUSED OPAQUE SENSITIVE SHOWING SINGLE_LINE VISIBLE'
text= <CORBA.Object '(null)' at 0x80d3810>
Traceback (most recent call last):
  • File "bug360272.py", line 512 in notifyEvent
    text = text._narrow(Accessibility.Text) COMM_FAILURE
I guess this must be a problem of python binding with at-spi.


Comment 9 Lynn Monsanto 2007-05-16 16:09:59 UTC
Jeff, Thanks for the information. Do you know who I can contact about the Python binding?

Comment 10 Willie Walker 2007-05-16 19:45:08 UTC
(In reply to comment #9)
> Jeff, Thanks for the information. Do you know who I can contact about the
> Python binding?
> 

The Python bindings are automatically generated via PyORBit.  I'm not convinced that's the source of the problem, though.  Instead, there might be some bad assumption made on the part of the CORBA support in the Java platform and the PyORBit stuff is exposing it.

It may also be something Orca is doing, but I'm not sure.  Perhaps writing a test using the new pyatspi bindings might give us more information: http://live.gnome.org/GAP/PythonATSPI
Comment 11 Willie Walker 2007-05-16 20:46:10 UTC
> The Python bindings are automatically generated via PyORBit.  I'm not convinced
> that's the source of the problem, though.  Instead, there might be some bad
> assumption made on the part of the CORBA support in the Java platform and the
> PyORBit stuff is exposing it.

I take that back: see bug 435825.
Comment 12 Lynn Monsanto 2007-06-19 18:24:37 UTC
*** Bug 449220 has been marked as a duplicate of this bug. ***
Comment 13 Lynn Monsanto 2007-06-19 18:27:32 UTC
I attached a test program to bug Bug 350742 that can be used to reproduce the problem. The test application create five labeled text fields. You can tab though the text fields and hear that Orca does not speak every text field, and that the text fields spoken are not the same when the test application is repeatedly run.
Comment 14 Jeff Cai 2007-08-03 10:20:06 UTC
I still think this maybe a problem of pyorbit. Assign this bug to pyorbit and hope the maintainer could give us feedback soon.
Comment 15 Gustavo Carneiro 2007-08-05 18:19:30 UTC
There's not much I can discover about the problem.  The pyorbit wrapper for _narrow () looks fine to me.  There's only one C line that may be raising a CORBA exception:

    type_matches = CORBA_Object_is_a(self->objref, repo_id, &ev);

If this line raises COMM_FAILURE then there must be something wrong with the CORBA connection (perhaps the CORBA server crashed?), or there is a bug in ORBit2.

If I were you I'd start by running the python client with ORBIT2_DEBUG=all, assuming you have an ORBit2 built with --enable-debug.
Comment 16 Jeff Cai 2007-08-06 02:28:09 UTC
I don't know much about orbit. Who can help us to see this issue? How about orbit guys?
Comment 17 Li Yuan 2007-08-07 06:26:32 UTC
Should talk to Michael Meeks <michael.meeks@novell.com>
Comment 18 Michael Meeks 2007-08-07 08:28:22 UTC
Sure - so; given that you understand that the python object introspection & construction is done using a non-standard ORBit2 specific extension ;-) and that you've overcome that problem (somehow).

Then perhaps this is some interesting protocol problem.

Luckily there are a lot of ways to debug that. Firstly, configure ORBit2 with --enable-debug=yes, make clean ; make install # etc.

then cf. corba-orb.c:

#ifdef G_ENABLE_DEBUG
static void
ORBit_setup_debug_flags (void)
{
	static GDebugKey debug_keys[] = {
		{ "traces",         ORBIT_DEBUG_TRACES },
		{ "inproc_traces",  ORBIT_DEBUG_INPROC_TRACES },
		{ "timings",        ORBIT_DEBUG_TIMINGS },
		{ "types",          ORBIT_DEBUG_TYPES },
		{ "messages",       ORBIT_DEBUG_MESSAGES },
		{ "errors",         ORBIT_DEBUG_ERRORS },
		{ "objects",        ORBIT_DEBUG_OBJECTS },
		{ "giop",           ORBIT_DEBUG_GIOP },
		{ "refs",           ORBIT_DEBUG_REFS },
		{ "force_threaded", ORBIT_DEBUG_FORCE_THREADED }
	};
	const char *env_string;

	env_string = g_getenv ("ORBIT2_DEBUG");

I would start with (eg.) ORBIT2_DEBUG=traces - and if that doesn't show you what is going on, I'd extend it to "messages", "giop", "all" by the time you get to "giop" you'll need some protocol understanding.
Comment 19 Jeff Cai 2007-08-07 08:49:50 UTC
Michael, i'm confused that if I use c interface to access corba, this error will not happen. Does this mean the problem exists in the implementation of pyorbit? 
Comment 20 Michael Meeks 2007-08-07 09:31:37 UTC
Jeff - no idea :-) Almost certainly the python version is using dynamic introspection, where the C version is using static type information :-)

However - it's great to have a working & non-working version. That means you can get the debug output for both, and then compare them to isolate the difference easily.
Comment 21 Lynn Monsanto 2007-08-27 14:40:30 UTC
Michael,

Do you have any news on this bug? It's a big accessibility problem since it's frequently impossible to get Java text field contents.

Thanks!
Comment 22 André Klapper 2014-08-02 12:22:25 UTC
PyOrbit is not under active development anymore.

This project has been recently archived in GNOME Git.

It is currently unlikely that there will be any further active development.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development again.