GNOME Bugzilla – Bug 404592
shutdown of a11y from at-spi crashes openoffice.org
Last modified: 2007-02-12 11:27:51 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
+ Trace 108160
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. */
Created attachment 82374 [details] [review] atk part of patch
Created attachment 82375 [details] [review] at-spi part of patch
Hi Caolan, the patch can fix the problem you said. But I cannot reproduce a crash on ubuntu. Which env are you using?
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
changed status to assigned... is this ready to check in?
Yes, committed.