GNOME Bugzilla – Bug 496587
getAttributes on an Accessible causes failures in java-access-bridge
Last modified: 2007-11-15 08:41:05 UTC
When an assistive technology calls getAttributes on an Accessible, it causes failures in the java-access-bridge: bash-3.2$ java -version java version "1.6.0_04" Java(TM) SE Runtime Environment (build 1.6.0_04-b07) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) bash-3.2$ uname -a SunOS solaris-devx 5.11 snv_76 i86pc i386 i86pc Solaris bash-3.2$ gnome-about --version GNOME gnome-about 2.20.0 bash-3.2$ java -jar /usr/java/demo/jfc/SwingSet2/SwingSet2.jar Nov 13, 2007 1:26:51 PM com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl convertThrowableToSystemException WARNING: "IOP00010202: (UNKNOWN) Unknown user exception thrown by the server" org.omg.CORBA.UNKNOWN: vmcid: SUN minor code: 202 completed: Maybe at com.sun.corba.se.impl.logging.ORBUtilSystemException.runtimeexception(ORBUtilSystemException.java:8365) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.convertThrowableToSystemException(CorbaMessageMediatorImpl.java:1918) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleThrowableDuringServerDispatch(CorbaMessageMediatorImpl.java:1868) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleThrowableDuringServerDispatch(CorbaMessageMediatorImpl.java:1821) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:258) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1680) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1540) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:922) at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181) at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:694) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:451) at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1189) at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:398) Caused by: java.lang.NullPointerException at org.GNOME.Accessibility.AttributeSetHelper.write(AttributeSetHelper.java:92) at org.GNOME.Accessibility.AccessiblePOA._invoke(AccessiblePOA.java:330) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:637) at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:189) ... 8 more
Created attachment 99060 [details] [review] Patch that seems to fix the problem In chasing this down, it seems as though the NullPointerException is coming from the following location: Caused by: java.lang.NullPointerException at org.GNOME.Accessibility.AttributeSetHelper.write(AttributeSetHelper.java:92) This is in a java-access-bridge file generated by idlgen. The offending line (line 92) seems to be the "ostream.write_long (value.length);" line: public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) { ostream.write_long (value.length); for (int _i0 = 0;_i0 < value.length; ++_i0) ostream.write_string (value[_i0]); } With some debugging, I was able to determine the value is indeed NULL. With more debugging, I think the problem seems to be in impl/org/GNOME/Accessibility/AccessibleImpl.java, which contains a "// TODO: fixme" for the "public String[] getAttributes ()" method. It returns the null that causes the write method above to croak. This patch attempts to fix the problem by returning an empty array instead of a null. Of course, the System.err.println should be removed before checking it in. :-)
Thanks, Willie. The patch looks good.
(In reply to comment #2) > Thanks, Willie. The patch looks good. > Great! Thanks! Can you please commit to the relevant branches (e.g., trunk and gnome-2-20 if there is one) and make sure a new release gets made for GNOME 2.20.2 and GNOME 2.21.3?
committed trunk and 2.20 branch.