Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems editing the attached file #118934

Closed
jvesouza opened this issue Mar 15, 2021 · 26 comments
Closed

problems editing the attached file #118934

jvesouza opened this issue Mar 15, 2021 · 26 comments
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues under-discussion Issue is under discussion for relevance, priority, approach
Milestone

Comments

@jvesouza
Copy link

Issue Type: Bug
CC: @isidorn

  1. Activate the orca screen reader.
  2. Open default.txt using VSCode.
  3. Press ctrl+g, type 1887 and press enter.
  4. Try navigate in the editor using the arrows.

At least on my machine, nothing is read by orca.
The problem also happens if all extensions are disabled.

The problem doesn't happen if I use code 1.54.2.

VS Code version: Code - Insiders 1.55.0-insider (06b5454, 2021-03-12T05:14:36.439Z)
OS version: Linux x64 5.11.6-arch1-1

System Info
Item Value
CPUs Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2494)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 4, 2, 1
Memory (System) 7.68GB (0.15GB free)
Process Argv -n --disable-extensions --no-sandbox --crash-reporter-id bcecf5e0-97d1-4830-b28c-0943c4adab1c
Screen Reader yes
VM 0%
DESKTOP_SESSION gnome-xorg
XDG_CURRENT_DESKTOP GNOME
XDG_SESSION_DESKTOP gnome-xorg
XDG_SESSION_TYPE x11
Extensions disabled
@isidorn isidorn added accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues under-discussion Issue is under discussion for relevance, priority, approach labels Mar 15, 2021
@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

@jvesouza thanks for filling this issue.
I can not reproduce the problem on macOS and Windows. However I believe the bug is related to my change since we decided to now put 2000 lines in the hidden textArea and that probably confuses Orca. If you set the
"editor.accessibilityPageSize": 1000 in your settings and restart VS Code does the issue go away? @jvesouza

@joanmarie I have updated to Ubuntu 20.04 and ever since I updated Orca is completely silent for all applications. Is there something which I misconfigured or should this just work? As a reminder I am using latest Orca from master using these instructions

@microsoft microsoft deleted a comment from vscodebot bot Mar 15, 2021
@isidorn isidorn added this to the March 2021 milestone Mar 15, 2021
@joanmarie
Copy link

I'm afraid I don't use Ubuntu. But some quick sanity checks:

  • spd-say hello (from the terminal; this will cause speech-dispatcher to say "hello". If you don't hear anything, it could be that Orca IS speaking and something is up with speech-dispatcher).
  • Launch Accerciser and see if you can use to to explore the accessibility tree of running applications. If Accerciser doesn't let you do this, then Orca probably cannot see the accessibility tree.

@jvesouza
Copy link
Author

@jvesouza thanks for filling this issue.
I can not reproduce the problem on macOS and Windows. However I believe the bug is related to my change since we decided to now put 2000 lines in the hidden textArea and that probably confuses Orca. If you set the
"editor.accessibilityPageSize": 1000 in your settings and restart VS Code does the issue go away? @jvesouza
Yes, if I change the value to 100 it makes the problem no longer happen.

@joanmarie I have updated to Ubuntu 20.04 and ever since I updated Orca is completely silent for all applications. Is there something which I misconfigured or should this just work? As a reminder I am using latest Orca from master using these instructions

@isidorn Would it be possible to run orca in the terminal to check if an error is happening?
Use the following command in the terminal:
orca -r

Another thing that can be done is to capture a debug session using the following command:
orca -r --debug-file=orca.debug.out
You can send me in PVT the file orca.debug.out.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

Thanks for help!

  1. spd-say hello works, so speech-dispatcher seems fine
  2. orca -r produces the following error
Traceback (most recent call last):
  File "/usr/local/bin/orca", line 32, in <module>
    import pyatspi
  File "/usr/lib/python3/dist-packages/pyatspi/__init__.py", line 17, in <module>
    import gi
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi'

So that seems to be the error. Might it be that I have python misconfigured on my Ubuntu VM?

@joanmarie
Copy link

Python or maybe python gobject introspection?

You should be able to do the following without error in a terminal: python3 -c "import gi"

Does that spit up?

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

@joanmarie that command just works. However running orca -r still produces the error which I guess is expected since that python3 command is not changing anything?

@joanmarie
Copy link

Orca appears to be producing that error because pyatspi is spitting up.

Does python3 -c "import pyatspi" work?

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

@joanmarie yes that just works (with no message in terminal).

Screenshot 2021-03-15 at 15 43 44

@joanmarie
Copy link

In my Orca executable (/usr/bin/orca), I have the following after the first set of inputs:

sys.prefix = '/usr'
pythondir = '${prefix}/lib/python3.9/site-packages'.replace('${prefix}', '/usr')
sys.path.insert(1, pythondir)

What do you have?

@joanmarie
Copy link

In the meantime, I am sometimes seeing the problem @jvesouza and sometimes not. i.e. Orca might read the line to me, might not, and does have a delay when it does present things. I'll take a look.

@joanmarie
Copy link

Here's the problem: AT-SPI2 / pyatspi is timing out. This suggests Chromium is being unresponsive/slow.

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/orca/event_manager.py", line 809, in _processObjectEvent
    script.processObjectEvent(event)
  File "/usr/lib/python3.9/site-packages/orca/script.py", line 334, in processObjectEvent
    self.listeners[key](event)
  File "/usr/lib/python3.9/site-packages/orca/scripts/toolkits/Chromium/script.py", line 146, in onCaretMoved
    default.Script.onCaretMoved(self, event)
  File "/usr/lib/python3.9/site-packages/orca/scripts/default.py", line 2346, in onCaretMoved
    self._presentTextAtNewCaretPosition(event)
  File "/usr/lib/python3.9/site-packages/orca/scripts/default.py", line 3009, in _presentTextAtNewCaretPosition
    self.sayLine(obj)
  File "/usr/lib/python3.9/site-packages/orca/scripts/web/script.py", line 947, in sayLine
    super().sayLine(obj)
  File "/usr/lib/python3.9/site-packages/orca/scripts/default.py", line 3374, in sayLine
    self.sayCharacter(obj)
  File "/usr/lib/python3.9/site-packages/orca/scripts/web/script.py", line 892, in sayCharacter
    super().sayCharacter(obj)
  File "/usr/lib/python3.9/site-packages/orca/scripts/default.py", line 3304, in sayCharacter
    offset = text.caretOffset
  File "/usr/lib/python3.9/site-packages/pyatspi/text.py", line 572, in get_caretOffset
    return Atspi.Text.get_caret_offset(self.obj)
gi.repository.GLib.GError: atspi_error: The process appears to be hung. (1)

In addition, the fact that Orca's falling back on saying the character suggests that the accessible text for the line is not being retrieved from Chromium correctly.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

@joanmarie I will Orca executable after my current meeting. Sorry for the slow response...
For the Chromium not sending the text, you probably can not reproduce if you set
editor.accessibilityPageSize: 1000 in your settings and restart vscode? That way we are putting less content in the textArea. I have lifted this limit because I thought Chromium fixed their performance issue for long textAreas

Thanks a lot for investigating

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

Here' the chromium issue which should be fixed in latest chrome for reference https://bugs.chromium.org/p/chromium/issues/detail?id=1001591&q=10000%20chars&can=2

@joanmarie
Copy link

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

Yes, I forgot about that one...
I was too optimistic with 2000 default line. Will go down to 1000, and we see how it goes in practice.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2021

@joanmarie here is the content from my Orca executable

sys.prefix = '/usr'
pythondir = '${prefix}/lib/python3.8/site-packages'.replace('${prefix}', '/usr')
sys.path.insert(1, pythondir)

@joanmarie
Copy link

Well, I'm honestly at a loss as to why Orca's spitting up on your machine.

Have you tried doing a make uninstall then cleaning out cruft (e.g. git clean -fxd), and then building and installing?

@isidorn
Copy link
Contributor

isidorn commented Mar 16, 2021

@joanmarie I cleaned everything cloned orca again and now I get the following when I try to make:

make: *** No targets specified and no makefile found.  Stop.

Shouldn't this just work from a fresh clone? Sorry about the questions...

@jvesouza did you maybe have a chance to try this file with todays insiders? Hopefully it should behave better.

@joanmarie
Copy link

@isidorn:

./autogen.sh --prefix=....
make
sudo make install

@jvesouza
Copy link
Author

@isidorn I tested with today's version using the same file and the problem didn't happen.

@isidorn
Copy link
Contributor

isidorn commented Mar 16, 2021

@joanmarie yeah I am doing that all the time. I just figured out that my python 3.8 is in usr/lib/python3.8 and not in usr/bin/lib/python3.8.

I tried running the autogen.sh with the following:

PYTHON=/usr/lib/python3.8 ./autogen.sh --prefix=/usr

And both time I get the following output and make does not work.
So it seems like

Package 'atk', required by 'atk-bridge-2.0', not found

Is the problem.

Full log

autoreconf: Entering directory `.'
autoreconf: running: autopoint --force
autopoint: using AM_GNU_GETTEXT_REQUIRE_VERSION instead of AM_GNU_GETTEXT_VERSION
autoreconf: running: aclocal --force --warnings=no-portability -I m4 ${ACLOCAL_FLAGS}
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force --warnings=no-portability
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing --warnings=no-portability
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for a sed that does not truncate output... /bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking whether ln -s works... yes
checking for itstool... itstool
checking for xmllint... xmllint
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for PYGOBJECT... yes
checking for ATSPI2... yes
checking for ATKBRIDGE... no
configure: error: Package requirements (atk-bridge-2.0 >= 2.26) were not met:

Package 'atk', required by 'atk-bridge-2.0', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ATKBRIDGE_CFLAGS
and ATKBRIDGE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

@isidorn
Copy link
Contributor

isidorn commented Mar 16, 2021

@jvesouza thanks, let close this issue then. And we can continue the discussion for my orca problems in the closed issue :)

@joanmarie
Copy link

@isidorn: I'm not an ubuntu user, but something along the lines of sudo apt-get builddep gnome-orca?

@isidorn
Copy link
Contributor

isidorn commented Mar 16, 2021

@joanmarie thanks, I was able to make and sudo make install after doing some apt-get.
However I am back at the original issue, when doing orga -r from the command line I get:

Traceback (most recent call last):
  File "/usr/local/bin/orca", line 32, in <module>
    import pyatspi
  File "/usr/lib/python3/dist-packages/pyatspi/__init__.py", line 17, in <module>
    import gi
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi'

@joanmarie maybe I create a new issue in the Orca repo and maybe someone on the internet might find a solution? What do you think?

@joanmarie
Copy link

Sure. Either that or ask on the Orca list? There are Ubuntu users there who don't follow Orca's issue tracker.

@isidorn
Copy link
Contributor

isidorn commented Mar 16, 2021

Okey. I sent to the mailing list. Let's see how it goes. Thanks for all the help!

@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

3 participants