GNOME Bugzilla – Bug 681276
Reentrancy problems on gnome-shell.
Last modified: 2013-06-17 17:25:31 UTC
With reference bugzilla 647074:
When at-spi2-core's event listener machinery is used from within gnome-shell to monitor focus and caret movement events, AND when those events are emitted by gnome-shell St widgets, then the system freezes for about 5 - 10 seconds. When the UI is responsive again, the AT-SPI event object passed back has no accessible component within it.
When the same code is run standalone outside of the gnome-shell process, then there is no delay, and the component is provided by the event object.
See comment 5 of 647074 for a patch to gnome-shell that shows the problem. Apply the patch and re-launch gnome-shell from a Terminal. Open the gnome-shell debugger (alt-f2, 'lg <return>'), and enter these commands:
1. ft = Main.focusCaretTracker;
2. FT = Main.FocusCaretTracker;
4. ft.connect('focus-changed', FT.onFocus);
5. <ESC> to leave the gnome-shell debugger.
Tabbing among GTK widgets (e.g., within FireFox) will show information about the focussed component within the Terminal window. Accessing a St widget (e.g., the task switcher), will show the freeze/delay.
If the code in the patch is launched from a gjs process separate from the one that gnome-shell is using, the delay doesn't occur.
This should be fixed with at-spi2-core commit e2dc52 and at-spi2-atk commit 683739. I'll make 2.9.3 releases today.
Created attachment 247040 [details] [review]
Patch for at-spi2-core
Adds a function to at-spi2-core to indicate whether libatspi has been initialized.
Created attachment 247041 [details] [review]
Patch to use atspi_is_initialized, rather than looking at AT_SPI_+CLIENT
This seems to fix the freeze problem.