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 404592 - shutdown of a11y from at-spi crashes openoffice.org
shutdown of a11y from at-spi crashes openoffice.org
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: atkbridge
1.7.x
Other All
: Normal critical
: ---
Assigned To: Li Yuan
Li Yuan
Depends on:
Blocks:
 
 
Reported: 2007-02-05 14:05 UTC by Caolan McNamara
Modified: 2007-02-12 11:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
atk part of patch (1.11 KB, patch)
2007-02-12 09:32 UTC, Li Yuan
committed Details | Review
at-spi part of patch (974 bytes, patch)
2007-02-12 09:32 UTC, Li Yuan
committed Details | Review

Description Caolan McNamara 2007-02-05 14:05:32 UTC
Steps to reproduce:
1. start openoffice.org 2.1.0 or openoffice.org 2.2.0 under gnome with a11y enabled
2. close openoffice.org



Stack trace:
0x00002aaaaaf0225e in main ()
   from /usr/lib64/openoffice.org/program/libvclplug_gtk680lx.so
(gdb) where
  • #0 main
    from /usr/lib64/openoffice.org/program/libvclplug_gtk680lx.so

Other information:
Here's the deal..

openoffice.org before g_threads_init uses gdk_threads_set_lock_functions to set it's own lock functions.

On exit OOo attempts to 1st shut down a11y itself by calling gnome_accessibility_module_shutdown so that a11y is finished and closed because the 2nd thing that OOo does is destroy its gtk vcl plugin, and finally after all that moves to exit

But at-spi has an atexit registered in src/bridge.c to do something on app exit, and that at-spi method calls gdk_threads_leave and gdk_threads_enter which due to the above OOo gdk_threads_set_lock_functions will call the OOo leave/enter which attempt to use destroyed objects as the objects have been deleted at step 2. There doesn't seem to be a way to tell at-spi to call it's finalization work earlier than atexit so as to avoid that atexit getting called after the OOo gtk plugin has been disposed of.

The relevent function in at-spi has the following comment which suggest that the problem might not be a surprise

  /*
   *  FIXME: this may be incorrect for apps that do their own bonobo
   *  shutdown, until we can explicitly shutdown to get the ordering
   *  right.
   */
Comment 1 Li Yuan 2007-02-12 09:32:11 UTC
Created attachment 82374 [details] [review]
atk part of patch
Comment 2 Li Yuan 2007-02-12 09:32:44 UTC
Created attachment 82375 [details] [review]
at-spi part of patch
Comment 3 Li Yuan 2007-02-12 09:34:35 UTC
Hi Caolan, the patch can fix the problem you said. But I cannot reproduce a crash on ubuntu. Which env are you using?
Comment 4 Caolan McNamara 2007-02-12 09:50:32 UTC
Well, I use the current release candidate of openoffice.org 2.2.0 on rawhide fedora, but the same thing should be reproducable with any openoffice.org >= 2.1.0 under GNOME with a11y enabled in the desktop environment
Comment 5 bill.haneman 2007-02-12 10:05:49 UTC
changed status to assigned... is this ready to check in?
Comment 6 Li Yuan 2007-02-12 11:27:51 UTC
Yes, committed.