Bug 23029 - Stack trace in assistive technology when a GUI client starts
Summary: Stack trace in assistive technology when a GUI client starts
Status: RESOLVED FIXED
Alias: None
Product: at-spi2
Classification: Unclassified
Component: atk (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Mark Doffman
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-29 15:26 UTC by Willie Walker
Modified: 2009-08-06 11:59 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to register self._refresh instead of self.update_handler (677 bytes, patch)
2009-07-29 15:26 UTC, Willie Walker
Details | Splinter Review
Rewrite emit() in registry.c (2.67 KB, patch)
2009-08-05 13:43 UTC, Mario Lang
Details | Splinter Review

Description Willie Walker 2009-07-29 15:26:00 UTC
Created attachment 28175 [details] [review]
Patch to register self._refresh instead of self.update_handler

Using at-spi2-core and at-spi2-atk from git master I performed the following in this order:

1) Launched at-spi-registryd in one shell
2) Launched Orca in another shell:
   PYTHONPATH=~/work/at-spi-dbus/bld/lib/python2.4/site-packages ./bld/bin/orca
3) Launched galctool in a third shell:
   gcalctool --gtk-module=gail:~/work/at-spi-dbus/bld/lib/gtk-2.0/modules/libspiatk.so

As soon as I launched gcalctool, Orca complained:

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/dbus/connection.py", line 214, in maybe_handle_message
TypeError: update_handler() takes exactly 3 arguments (1 given)

When I look at applicationcache.py, I see update_handler is defined as so:

def update_handler (self, update_type, bus_name):

and I see it registered as so:

self._regsig = connection.add_signal_receiver(
                   self.update_handler,
                   dbus_interface=ATSPI_REGISTRY_INTERFACE,
                   signal_name="updateApplications")

When I redefined update_handler temporarily as so:

def update_handler (self, update_type=None, bus_name=None):
    print "HERE", update_type, bus_name
    ...

I see that update_type and bus_name are None.  So, I suspect something unintended is happening here.

If I pass self._refresh instead of self.update_handler to add_signal_receiver, it seems to eliminate the problem. But, I'm not sure this is the right thing to do:

self._regsig = connection.add_signal_receiver(
                   self._refresh,
                   dbus_interface=ATSPI_REGISTRY_INTERFACE,
                   signal_name="updateApplications")
Comment 1 Mario Lang 2009-08-05 13:43:31 UTC
Created attachment 28381 [details] [review]
Rewrite emit() in registry.c

The org.freedesktop.atspi.Registry.updateApplications signal is supposed
to have two arguments.  Due to the breakage in dbind_emit_signal_va
it can happen that the signal gets fired, but with 0 arguments instead of 2.
This patch rewrites emit() in registry.c so that it now works as expected.

Tested and verified that now, indeed two arguments are passed along when the updateApplications signal is emitted.
Comment 2 Mark Doffman 2009-08-06 11:59:16 UTC
Mario is correct the problem here is where the signal is emitted in the registryd. His patch has been applied in commit 6cc3ebd92f88b5cdcd72dd6e028c72c8e3a12d57. Everything seems to be working.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.