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 750531 - Periodically clean up defunct applications
Periodically clean up defunct applications
Status: RESOLVED OBSOLETE
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-07 21:39 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2021-07-05 10:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joanmarie Diggs (IRC: joanie) 2015-06-07 21:39:28 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!
Comment 1 Peter Vágner 2015-08-15 15:00:39 UTC
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.
Comment 2 Wayne Mery 2017-11-27 11:25:22 UTC
@Mike is this something you can look at, or direct to someone who can?
Comment 3 André Klapper 2018-08-31 09:51:03 UTC
Moving open tickets in at-spi2' "registry" Bugzilla component to "at-spi2-core" as it has a subdir called "registryd".
Comment 4 GNOME Infrastructure Team 2021-07-05 10:44:54 UTC
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.