- Package:
- gnome-orca
- Source:
- orca
- Submitter:
- Mika Hanhijärvi
- Date:
- 2020-12-05 15:48:02 UTC
- Severity:
- important
- Tags:
Synaptic often freezes the Orca screen reader so that Orca speaks nothing until Synaptic is closed. The same happens on both of my laptops running Debian Stretch. I am blind so I have to use computer using Orca screen reader. It happens wery often that when I e.g click the Reload button in Synaptic, or select Reload from the Synaptic menu, then Orca screen reader stops speaking. Synapticdoes not freeze the whole desktop, just Orca. This problem seems to happen randomly, sometimes it happens sometimes it does not. When Synaptic has finished reloading the package database information Orca may start speaking again, but often it does not. If it does not then I have to close the Synaptic by pressing alt + F4 after which Orca starts to speak again. It also happens sometimes that if I have reloaded repository package database information and click Mark all updades after that then Orca stops speaking. On my second laptop it currently happens almost every time that Orca stops speaking when I click the Mark all updates or select it from the menu. Tkhat also seems to happen randomly, sometimes it happens sometimes not. I have not noticed any problems like that when I have used other applications, this happns only when I am using Synaptic. As I said I have two laptops running Debian Stretch and both have the same problems. Both laptops have been upgraded from Jessie to Stretch. The first laptop was almost clean Jessie installation before it was upgraded to Stretch, it still has wery little apps installed. I am using Gnome desktop. I am blind so it is difficult for me to try to figure out what is wrong. I I have used both espeak and espeak-ng speech synthetisers with Orca screen reader, the same problem exists notmatter which of those is in use.
Hi Mika, Sorry to hear that synaptic is causing you issues. I am CC'ing the accessibility list hoping that they might have an insight to what is happening. I have quoted the original mail in full below for their sake. Thanks, ~Niels (PS: Please CC me on replies if you need my attention. I am not the maintainer of synaptic)
Hi Mika, Would it be possible for you to take a screenshot of synaptic + orca when the problem occurs? If we are lucky there might be an error message for us in it that orca is unable to read out loud. Thanks, ~Niels
Forwarding the request for information to the submitter directly, he may not be subscribed to this bug. Paul
Paul Gevers: Thanks for noticing I had missed that explicit CC. :) ~Niels
Hey, I managed to reproduce this issue by: 1) running orca and synaptic 2) clicking "Reload" 3) clicking "Mark all upgrades" 4) clicking "Apply" and proceeding to install ~12 packages. Orca stopped speaking until synaptic was closed. This only happened when upgrading via "Mark all upgrades"; I didn't seem to have the same problems when just installing a new package. I'm attaching a log with various error messages that orca printed to the console; sorry I've not narrowed it down further yet! Hope that helps,
Tim Retout:
Reading the log file, we at least have one bug in Orca itself (a Python
"NameError"). I am not entirely sure whether this bug triggers the
"hung" process or the "hung" process triggers the "NameError".
I am reassigning this bug to gnome-orca for now, so the maintainer of
orca can have a look at it.
@Orca maintainers: The Orca log shows:
"""
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/orca/generator.py", line 234, in
generate
result = eval(formatting, globalsDict)
File "<string>", line 1, in <module>
NameError: name 'ancestors' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/orca/generator.py", line 245, in
generate
globalsDict[arg] = self._methodsDict[arg](obj, **args)
File "/usr/lib/python3/dist-packages/orca/braille_generator.py", line
278, in _generateAncestors
and not self._script.utilities.isLayoutOnly(parent):
File "/usr/lib/python3/dist-packages/orca/script_utilities.py", line
1203, in isLayoutOnly
elif obj.childCount == 1 and obj.name and obj.name == firstChild.name:
GLib.GError: atspi_error: The process appears to be hung. (1)
"""
Thanks,
~Niels
Hi Not sure if you (Niels) looked at the code, but when I look at it, that NameError is something that is not uncommon to happen as the whole exception handling is written exactly to handle that: https://sources.debian.net/src/gnome-orca/3.22.2-2/src/orca/generator.py/#L233 The "hung" happens in the exception handling (which in itself is also in a try/except block). To me (but I am not very good in Python and not at all familiar with Orca) it still looks like synaptic is doing something that in the end triggers a time out. I hope somebody with more Python and/or Orca knowledge can shine a light on this. Paul
Paul Gevers: Hi Paul, I had a brief look at the code and: * You are right that the NameError is expected. It appears to be some method for lazily loading/evaluating values. * The actual issue is the other stacktrace. * The exception appears to be thrown from accessing an attribute. I am assuming that object/attribute is a reference to an GUI object in the synaptic process using a GLib/GTK protocol. * I have not seen that error before, but codesearch.d.n helpfully points us to [1]. * From that, I found [2], which suggests atspi concludes synaptic to be hung because it does not respond to a dbus "ping" call to "org.freedesktop.DBus.Peer". Not that it makes me any wiser as to why the problem occurs. Time to hunt for some dbus experts who can tell us why a process might fail to respond to a ping. Thanks, ~Niels [1]: https://sources.debian.net/src/at-spi2-core/2.22.0-5/atspi/atspi-misc.c/?hl=1080#L1080 [2]: https://sources.debian.net/src/at-spi2-core/2.22.0-5/atspi/atspi-misc.c/?hl=1080#L1028
Niels Thykier, on mer. 19 avril 2017 20:19:00 +0000, wrote: Well, the application could simply be busy doing other stuff, like processing huge packages lists for synaptic. And that's not a reason for Orca to freeze, for me that's the most important bug to fix: Orca shouldn't rely on applications behaving correctly. Samuel
Samuel Thibault: Ok, thanks for clarifying. :) I have retitled the bug to reflect the situation. Thanks, ~Niels
Am 19.04.2017 um 22:37 schrieb Niels Thykier: Is this https://bugzilla.gnome.org/show_bug.cgi?id=756514 maybe?
Michael Biebl, on mer. 19 avril 2017 22:55:01 +0200, wrote: That very much looks so :) Now, the bug is reported as being a regression from Jessie, perhaps for the Stretch case we should check what changed, since Orca not being robust against non-responsive applications is not really something new. Samuel
Orca knows better than to do that. ;) There may be yet another bad behavior that it's failing to handle. Please send me a full debug.out, captured from Orca master or Orca 3.24.x (i.e. current stable). Instructions here: https://wiki.gnome.org/Projects/Orca/Debugging Thanks. --joanie
Hi Joanmarie, I hope the attached log contains enough information for you to work it out. Mind you, my Orca setup isn't speaking (as can be seen from the top of the log), but I think it captures the same error as reported in this bug already. I created a Debian package for the 3.24 version which I build on debomatic¹ for this purpose. Paul ¹ http://debomatic-amd64.debian.net/distribution#unstable/gnome-orca/3.24.0-1
Thanks! From a quick glance, Orca isn't frozen. Orca is still getting and processing accessibility events even after that error. But it's getting those events from defunct accessible objects, objects with ROLE_INVALID, etc. I'll take a longer look next week and handle the currently-unhandled error. But the problem may persist. Orca cannot bring defunct/invalid objects back from the dead; it can only try to gracefully step around their bodies. Thus getting to the bottom of the Synaptic and/or AT-SPI2 issues needs to occur. I'd be curious to know what happens if, when the Synaptic issue occurs, you Alt+Tab into another accessible application. Does Orca present your interactions with that app? Thanks again! --joanie
Hi Joanmarie, Yesterday, I send you a log while Synaptic had not much to do, because I ran it earlier the same day (so maybe the original issue wasn't there). Today I tried again, hoping that there were updates to apply, which there were. orca segfaulted on me. Please see the attached stack trace. Maybe it tells more than the one of yesterday. paul@testavoira ~/tmp $ orca /usr/lib/python3/dist-packages/pyatspi/Accessibility.py:184: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Atspi.Event.host_application = property(fget=lambda x: x.source.get_application()) Segmentation fault paul@testavoira ~/tmp $ For people normally running orca, would it get automatically restarted, such that it would appear to hang, will in reality it was restarting? Or is it more likely I experienced another bug, maybe related to debugging? Or maybe the behavior is slightly different between the Debian version and my (newer) version of orca. Paul
That segfault is an AT-SPI2 bug. And apparently an elusive one. https://bugzilla.gnome.org/show_bug.cgi?id=767074
Hi Joanmarie, Just to get things straight, do you mean here that you do or that you don't believe this segfault has anything to do with the current bug? If not, I can try getting logs until I am not hit by this segfault AND there is something more in the log than the already known issue. Paul
Hi, Pending an answer :) Not sure if there is anything interesting in the log, but I have a new one where orca didn't crash. Does that help? Paul
It identifies an unhandled exception which I can handle. Again, that may or may not magically make Orca present synaptic. Thanks for the log! --joanie
So I just handled the value-related "The process appears to be hung" exception. I saw that you also had the name-related exception. But the line number suggests to me that you don't have another change I made, namely to return immediately in isLayoutOnly() if obj is dead. I'm not positive, but I'm hopeful that check will prevent the name-related exception. (And if not, I'd like to know that.) Therefore, before you try to log other issues, would you mind pulling master or the gnome-3-24 branch so you have the latest? Thanks again! --joanie
Hi Joanmarie, I checked out the gnome-3-24 branch and tried to build¹ a Debian package from that, that I could install. With that, I did again a run of synaptic upgrade. Please find the attached debug log and hopefully it contains more useful info. And to prepare for fixes of the package in Debian (which is 3.22.2 and will be extremely hard convince the release managers to update in this stage due to the freeze), which fixes would we need to backport to fix the issues identified so far? Paul ¹ http://debomatic-amd64.debian.net/distribution#testing/gnome-orca/3.24.1~pre2-1
Handle yet another Atspi "The process appears to be hung" exception
commit 382c5408afc7dd25f9b477a5e30c50ba917155c0
Author: Joanmarie Diggs <jdiggs@igalia.com>
Date: Sat Apr 29 11:28:17 2017 -0400
Add check for dead accessibles before attempting to generate
presentation
commit d51f87a7f000d099da98247dc7ca337b2b5483be
Author: Joanmarie Diggs <jdiggs@igalia.com>
Date: Fri Apr 28 15:35:39 2017 -0400
Handle another Atspi "The process appears to be hung" exception
commit edbfafbd89409bfb1e4a4e3a9339c0b2de7435d6
Author: Joanmarie Diggs <jdiggs@igalia.com>
Date: Thu Apr 27 06:35:11 2017 -0400
Return immediately in isLayoutOnly() if obj is dead
---------
Note that 382c540 may need to be reverted. Hopefully not. But rather
than playing endless whac-a-mole with Atspi errors resulting from
whatever it is Synaptic is doing, I am sanity checking much earlier on
in the process. There is the possibility that doing so will cause other
badly-behaved apps to not be presented. :-/
I've asked on the Orca list for testing, and we have enough users that
use master and respond quite quickly to calls for testing, that we
should know soon enough.
I believe I've already said this, but I'll say it again: Getting to the
bottom of the Synaptic and/or AT-SPI problem(s) should be done.
(Something I'm afraid I don't have time for. Sorry!)
Hi Mika, Tim, I prepared and build¹ a Debian gnome-orca package with the above mentioned upstream commits that should prevent Orca from freezing (or appearing to do so). It would be great if you could install the deb² (checksum below³) and report if it resolves your issues with Synaptic (as my Orca installation isn't set-upped properly, I don't hear anything). Paul ¹ http://debomatic-amd64.debian.net/distribution#testing/gnome-orca/3.22.2-3~debo1 ² http://debomatic-amd64.debian.net/debomatic/testing/pool/gnome-orca_3.22.2-3~debo1/gnome-orca_3.22.2-3~debo1_all.deb ³ paul@testavoira ~ $ sha256sum gnome-orca_3.22.2-3~debo1_all.deb 6d9c8bca6b211ac1570792dd66fde8a46cdf59a038b87a0d9bf16a43822e1887 gnome-orca_3.22.2-3~debo1_all.deb
Samuel, Do you think we should clone/open a bug for atspi? If so, what severity level (assuming we can get orca in shape to behave in the current case)? I would think the answer to the first question is yes, and to the second question normal (at least < RC if we can fix Orca). Do you think we should get Synaptic to behave better? I.e. file a bug there? If so, do we (you?) understand the issue well enough to describe it properly? Paul
Hello Ok. I will try it now, thanks.
Hi Joanmarie, As you have seen, I already created a Debian package with your commits included. Please find attached a debug log generated while running Synaptic with this new Orca package (3.22.2 based) and verify that it looks like intended now. @all reading this bug, feedback is welcome. Paul P.S. I'll probably start working on getting Orca to produce sound on my laptop soon, so that I can actually test what I am doing ;)
Thanks Paul. From your output I see you clicked on the Apply button in Synaptic, a bunch of events from DEAD accessible objects resulted, that Orca kept processing events, presented the window you Alt+Tabbed into, etc. Having said that, if memory serves me, even before the changes I made, Orca kept processing events, and probably would have presented the window you Alt+Tabbed into. In other words, I don't know if, from the user's perspective, anything has changed. But it appears that I've done all I can do in Orca (i.e. handling the exceptions it's getting from AT-SPI2 as a result of querying Synaptic for information via AT-SPI2).
Hi all, Just for the record, and I have no idea if it is relevant, but Synaptic also makes the main Synaptic window and/or its menu items inaccessible for the sighted people after pressing buttons. This is meant as feedback that Synaptic is busy. Maybe this behavior has something to do with the bug at hand (the one in AT-SPI2 I mean). And I would still appreciate feedback on my package. @Joanmarie, did you get any feedback on the Orca list? Paul
Nope. I take that to mean all is well. --joanie
Hi all, If this bug doesn't receive negative feedback about my package, I'll try to upload the fix to unstable tomorrow. Paul
I'm not yet a Stretch user but the Orca developer has submitted a patch to fix this bug : take a look at <https://mail.gnome.org/archives/orca-list/2017-April/msg00184.html>. Best regards.
We believe that the bug you reported is fixed in the latest version of
gnome-orca, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 859262@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Paul Gevers <elbrus@debian.org> (supplier of updated gnome-orca package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 03 May 2017 20:21:45 +0200
Source: gnome-orca
Binary: gnome-orca
Architecture: source
Version: 3.22.2-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Accessibility Team <debian-accessibility@lists.debian.org>
Changed-By: Paul Gevers <elbrus@debian.org>
Description:
gnome-orca - Scriptable screen reader
Closes: 859262
Changes:
gnome-orca (3.22.2-3) unstable; urgency=medium
.
* Team upload.
* cherry-pick upstream commits to prevent Synaptic (and other badly
behaving binaries) from causing harm to the Orca experience:
- edbfafbd89409bfb1e4a4e3a9339c0b2de7435d6
- d51f87a7f000d099da98247dc7ca337b2b5483be
- 382c5408afc7dd25f9b477a5e30c50ba917155c0
- ea02cc2d268348c22ffe8c23099f6b023d4c90a7
(Closes: #859262)
Checksums-Sha1:
c3c42415044ec7f8143dfa147d5ae9636530ceee 2034 gnome-orca_3.22.2-3.dsc
4fc158e2a2401a29ccfa3ce5b7e0808311e1332e 9888 gnome-orca_3.22.2-3.debian.tar.xz
Checksums-Sha256:
491e370064a28268aca78e503a866135ac56166da7773d53501918ff1ac7bffe 2034 gnome-orca_3.22.2-3.dsc
61a10b603785f08db0d0c5dd7d5a1aff6db914c29f9f7e773eab20caf4640102 9888 gnome-orca_3.22.2-3.debian.tar.xz
Files:
422918e77664b424d2eb3441c4fd13a4 2034 gnome optional gnome-orca_3.22.2-3.dsc
817d56692f6226d96c271db3ec01cc37 9888 gnome optional gnome-orca_3.22.2-3.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEWLZtSHNr6TsFLeZynFyZ6wW9dQoFAlkKIL0ACgkQnFyZ6wW9
dQqkpQf/dEsDxVVoJAIZZ2KfNFNNmV8nXkdMHsI2kefizKYEn9ioz/cm/6vYY0gw
yhIGQetEhjnEHKT2MsQvgs60gvoehuadKkQ8vtioD9/8fY27HQvvCO+DA9xaJ+aV
dY4iVtutC7ONQFvL90cIY1yCrlBmDZa6APEzFFf2gixlq+9GTZjURyE5bv/ONl3+
greKLEvIKtbZrV+sB+DHIUryhLeF5WkBR++RwS10Yvn7U1rKmGkIXQPEj412BX+z
46C5NoiVVwZFU7WDiYeR4SM6SPYDAatYM7CW95cTSXaL0/ObDOBoy5GDLVkgUThM
CURkdsFuJmf/8fiZ7zmf1y27XAGnuw==
=iRb8
-----END PGP SIGNATURE-----
Unfortunately this did not fix the problem. The problem still exists. I still have noticed this only when using Synaptic. One interesting thing is that if it happens when I do this: /) Go to eg virtual desktop 2 on Gnome/ 2) start Synaptic on that virtual desktop 3) click Reload button 4) Go to e.g virtual desktop 1 and do something else like browse the web using firefox or something else 5) Let Synaptic to finish reloading the repository information, 6) Go back to virtual desktop 2 where Synaptic is running and where it's window is open Orca stops speaking when you do the step 6. That happened again some minutes ago and that has happened many times. Synaptic was running and reloading on one virtual desktop and I was browsing facebook on another virtual desktop. Everything worked just fine until I did goback to that virtual desktop where Synaptic was running. When I did that Orca immediately stopped to speak. When I closed the Synaptic using alt + f4 then Orca started to speak again. And by the way I do not remember if this problem existed in Debian Jessie. Both of my laptops are quite new. I first installed Debian Jessien on those laptops, but I upgraded to Stretch soon after that. My desktop computer is still running Debian 7.0 "Wheezy". I did not really use Debian 8.0 "Jessie" much on those laptops so you can say that I jumped from Wheezy to Stretch. This problem does not exist in Wheezy and I really can not say if it existed in Jessie, but it does still exist in Stretch. I do not know if this problem exists in new Stretch installations. I am going to make a clean Stretch install when I buy the new SSD disk, but I can not do that right now.
Hi Mika, That is a shame. Could you please try to get the debugging information needed by Joanmarie on your system? It was difficult to provide her with this information as I don't use orca myself nor experience the exact problem you are having. Without the debugging info, there is not much we can do. Paul
Hi Mika, Today, bug 872912¹ was filed against libatspi2.0 and the symptom matches somehow with yours. Do you think you can test the fix that Samuel uploaded for that bug? Paul ¹ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872912
Hi Mika, Is this still an issue (in either buster or stretch)? Paul