GNOME Bugzilla – Bug 750531
Periodically clean up defunct applications
Last modified: 2021-07-05 10:44:54 UTC
Steps to reproduce (admittedly a bit of work and maybe not needed from the description....) 1. Create a Thunderbird mail folder with many thousands of messages 2. Select that folder so the huge message list is loaded upon next launch 3. Quit Thunderbird 4. Launch Orca 5. Launch Thunderbird (Wait forever see https://bugzilla.mozilla.org/show_bug.cgi?id=924915) 6. Quit Orca 7. In a python console type the following: ----------------------- import pyatspi d = pyatspi.Registry.getDesktop(0) for child in d: print(child) <press return here> ----------------------- When I do this, in my environment I get: [application | gnome-settings-daemon] [application | ibus-x11] [application | org.gnome.Software] ... [application | gedit] [DEAD] Sometimes instead of [DEAD] it lists [invalid | ]. But either way, it's defunct. And dead/defunct application is Thunderbird. 8. With Thunderbird still running, in a terminal run an accessible pyatspi listener for "window" events. Here's mine: ----------------------- #!/usr/bin/python3 import pyatspi def listener(e): print(e) pyatspi.Registry.registerEventListener(listener, "window:") pyatspi.Registry.start() ----------------------- 9. Alt+Tab into and out of Thunderbird. I see things like: window:deactivate(0, 0, Archives - my.email@foo.com - Mozilla Thunderbird) source: [invalid | ] host_application: [invalid | ] window:activate(0, 0, Archives - my.email@foo.com - Mozilla Thunderbird) source: [invalid | ] host_application: [invalid | ] 10. Change the listener to listen for "object:state-changed:focused" events instead. Alt+Tab back into Thunderbird and arrow up and down in that huge list of messages. I see things like: object:state-changed:focused(1, 0, 0) source: [window | ] host_application: [application | gnome-shell] object:state-changed:focused(1, 0, 0) source: [invalid | ] host_application: [invalid | ] object:state-changed:focused(1, 0, 0) source: [invalid | ] host_application: [invalid | ] object:state-changed:focused(1, 0, 0) source: [invalid | ] host_application: [invalid | ] Admittedly long way of saying that it appears that once the registry has concluded Thunderbird is defunct, it sticks with that conclusion. As a result, even after the huge pause of death (that mozilla bug referenced above), subsequent events emitted by Thunderbird are still coming from invalid/dead event sources and from an invalid/dead app. Thus Orca ignores them and Orca users are unhappy. If this is a registry issue (Thunderbird is no longer dead, but the registry thinks it is), it would be super if periodic cleanup of applications could be done so Orca could eventually present Thunderbird once it becomes responsive again. Thanks!
I most likelly have missed this bug eventhough I am on its CC list. What I have to add that when I open a new tab in Thunderbird such as list of downloaded files by pressing ctrl+j at-spi eventually starts dispatching events with valid sources and objects. So definatelly there is a way to make at-spi aware Thunderbird is alive again but it *should* get smarter I wish.
@Mike is this something you can look at, or direct to someone who can?
Moving open tickets in at-spi2' "registry" Bugzilla component to "at-spi2-core" as it has a subdir called "registryd".
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/ Thank you for your understanding and your help.