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 321814 - Tickling AT-SPI hierarachy with embedded apps corruption/hang/crash
Tickling AT-SPI hierarachy with embedded apps corruption/hang/crash
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: general
unspecified
Other All
: High critical
: ---
Assigned To: bill.haneman
bill.haneman
AP1
Depends on:
Blocks:
 
 
Reported: 2005-11-18 16:59 UTC by Willie Walker
Modified: 2006-01-26 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to return NULL for gail_toplevel_get_parent; required for rest of bugfix. (4.29 KB, patch)
2005-11-18 17:08 UTC, bill.haneman
none Details | Review
patch to fix parent/child relationships for embedded BonoboControls (3.42 KB, patch)
2005-11-18 17:10 UTC, bill.haneman
committed Details | Review

Description Willie Walker 2005-11-18 16:59:49 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.
Comment 1 bill.haneman 2005-11-18 17:05:01 UTC
Thanks Will.  Patch for libgail-gnome attached.  There was also a gail patch
required, which I'll attach as well.
Comment 2 bill.haneman 2005-11-18 17:06:07 UTC
remember to cc gnome-access-bugs and set the 'accessibility' keyword.  THanks!
Comment 3 bill.haneman 2005-11-18 17:08:29 UTC
Created attachment 54920 [details] [review]
patch to return NULL for gail_toplevel_get_parent; required for rest of bugfix.
Comment 4 bill.haneman 2005-11-18 17:09:43 UTC
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
Comment 5 bill.haneman 2005-11-18 17:10:51 UTC
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.
Comment 6 bill.haneman 2005-11-18 17:11:43 UTC
Fixed in CVS, in libgail-gnome version 1.1.2 and in gail version 1.8.6.
Comment 7 bill.haneman 2006-01-26 17:26:40 UTC
*** Bug 328407 has been marked as a duplicate of this bug. ***