GNOME Bugzilla – Bug 321814
Tickling AT-SPI hierarachy with embedded apps corruption/hang/crash
Last modified: 2006-01-26 17:26:40 UTC
Apply the attached patch to at-spi/event-listener-test.c. It simply causes the test to tickle the parent hierarchy of objects that it receives in events, something that should be quite legal for any assistive technology to do. Then: 1) Run resulting event-listener-test 2) Start gedit or evolution *after* you start the event-listener-test You will discover that: 1) The event-listener-test will find objects that report themselves as their own parent. 2) The application will issue warnings such as the following: (gedit:31132): GLib-GObject-WARNING **: invalid cast from `SpiAccessible' to `BonoboControlAccessible' 3) When one attempts to quit the application (e.g., gedit or evolution), it will intermittently hang or crash. The hang is quite bad in that it can also freeze the entire AT-SPI registry, freezing the desktop and any running assistive technology.
Thanks Will. Patch for libgail-gnome attached. There was also a gail patch required, which I'll attach as well.
remember to cc gnome-access-bugs and set the 'accessibility' keyword. THanks!
Created attachment 54920 [details] [review] patch to return NULL for gail_toplevel_get_parent; required for rest of bugfix.
Here is the correct gail patch (ignore previous patch) Index: gail/gail/gailtoplevel.c =================================================================== RCS file: /cvs/gnome/gail/gail/gailtoplevel.c,v retrieving revision 1.30 diff -u -r1.30 gailtoplevel.c --- gail/gail/gailtoplevel.c 16 Feb 2004 17:18:28 -0000 1.30 +++ gail/gail/gailtoplevel.c 28 Sep 2005 12:43:54 -0000 @@ -31,6 +31,7 @@ static gint gail_toplevel_get_n_children (AtkObject *obj); static AtkObject* gail_toplevel_ref_child (AtkObject *obj, gint i); +static AtkObject* gail_toplevel_get_parent (AtkObject *obj); /* Callbacks */ @@ -90,12 +91,13 @@ GObject *object; AtkObject *accessible; - object = g_object_new(GAIL_TYPE_TOPLEVEL, NULL); + object = g_object_new (GAIL_TYPE_TOPLEVEL, NULL); g_return_val_if_fail ((object != NULL), NULL); accessible = ATK_OBJECT (object); accessible->role = ATK_ROLE_APPLICATION; accessible->name = g_get_prgname(); + accessible->accessible_parent = NULL; return accessible; } @@ -110,6 +112,7 @@ class->get_n_children = gail_toplevel_get_n_children; class->ref_child = gail_toplevel_ref_child; + class->get_parent = gail_toplevel_get_parent; g_object_class->finalize = gail_toplevel_object_finalize; } @@ -169,6 +172,13 @@ g_list_free (toplevel->window_list); G_OBJECT_CLASS (parent_class)->finalize (obj); +} + +static AtkObject* +gail_toplevel_get_parent (AtkObject *obj) +{ + g_warning ("RETURNING NULL PARENT FOR APPLICATION..."); + return NULL; } static gint
Created attachment 54921 [details] [review] patch to fix parent/child relationships for embedded BonoboControls This patch fixes the bug, in conjunction with the gail patch shown inline, above.
Fixed in CVS, in libgail-gnome version 1.1.2 and in gail version 1.8.6.
*** Bug 328407 has been marked as a duplicate of this bug. ***