nvda icon indicating copy to clipboard operation
nvda copied to clipboard

Nvda freezes for longer time when focusing large xml files in android studio

Open PeterLecky opened this issue 2 years ago • 5 comments

Steps to reproduce:

  • Open Android studio with some project
  • Focus some xml file which is large enough, mine is 2214 lines long.

Actual behavior:

NVDA stops speaking and seems frozen for approximately 10 seconds. It is possible to work and edit the file after this time. NVDA log contains a lot of messages of this kind:

ERROR - unhandled exception (09:21:26.340) - MainThread (7624):
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "JABHandler.pyc", line 691, in internal_event_stateChange
  File "JABHandler.pyc", line 335, in internalQueueFunction
  File "queue.pyc", line 190, in put_nowait
  File "queue.pyc", line 136, in put
queue.Full
ERROR - unhandled exception (09:21:26.341) - MainThread (7624):
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "JABHandler.pyc", line 720, in internal_event_caretChange
  File "JABHandler.pyc", line 335, in internalQueueFunction
  File "queue.pyc", line 190, in put_nowait
  File "queue.pyc", line 136, in put
queue.Full
ERROR - unhandled exception (09:21:26.342) - MainThread (7624):
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 232, in 'calling callback function'
  File "JABHandler.pyc", line 720, in internal_event_caretChange
  File "JABHandler.pyc", line 335, in internalQueueFunction
  File "queue.pyc", line 190, in put_nowait
  File "queue.pyc", line 136, in put
queue.Full

Expected behavior:

NVDA should work and let us to edit xml file immediately when is the file focused.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2021.2, tested also with older versions

Windows version:

Windows 10 21H1 (10.0.19043) workstation

Name and version of other software in use when reproducing the issue:

Android Studio Arctic Fox | 2020.3.1 Patch 3

Other information about your system:

Thinkpad p14s gen2 (i7-1165G7 @ 2.80GHz, 16GB RAM)

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

Same in previous version

If NVDA add-ons are disabled, is your problem still occurring?

yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

yes log.txt

PeterLecky avatar Dec 02 '21 09:12 PeterLecky

Hello, This problem still exists, also with nvda 2022.2 beta. Can I somehow help to track it?

PeterLecky avatar Jun 17 '22 11:06 PeterLecky

There was some work done recently in this area, see #13039, it might be worth testing the latest NVDA alpha: https://www.nvaccess.org/files/nvda/snapshots/

feerrenrut avatar Jul 07 '22 06:07 feerrenrut

This unfortunately didn't fix the problem. Tested with nvda_snapshot_alpha-25756,ba743746 Peter

PeterLecky avatar Jul 07 '22 08:07 PeterLecky

Having a quick think about this one I get the following thoughts and questions. The log entries posted makes it look like NVDA is getting flooded with events which fills up its event queue. Whether all these events are needed or relevant or whether NVDA should be discarding some of them may be a suitable approach to explore. I doubt any of the recent Java improvements would help with this if the cause is as I suspect.

mwhapples avatar Aug 04 '22 08:08 mwhapples

@PeterLecky could you provide a sample android project which causes this. Also when you say an XML file, is this any specific type of XML, in particular an Android view XML. I use IntelliJ frequently with NVDA and have not noticed such an issue, but I use it for desktop Java applications. So my thought is whether something like the preview for android XML views is firing all these events and not the XML text editor itself.

mwhapples avatar Aug 04 '22 08:08 mwhapples

Hello, Thank you for your time with this. I actually found that the problem lies somewhere in configuration of my project. I created a new project and copied my large xml resource file to it and it works fine, no lagging, no messages in the log. Actually exploring quite large workspace.xml which is that file which probably causes this. Tried to copy it to my new project and problems arised also in it. So, i probably enabled somewhat somewhere in that forest of different settings in android studio which causes that flood of accessibility events. Will try to check it with someone sighted, may be that we will find that i enabled some nice visual feature which i do not need and have. ;) Thanks again. It still seems that something needs to be fixed somewhere, because that bunch of accessibility events is probably not okay in any case. I will write in case of some new info.

PeterLecky avatar Aug 11 '22 11:08 PeterLecky

Hello, Thank you for your time with this. I actually found that the problem lies somewhere in configuration of my project. I created a new project and copied my large xml resource file to it and it works fine, no lagging, no messages in the log. Actually exploring quite large workspace.xml which is that file which probably causes this. Tried to copy it to my new project and problems arised also in it. So, i probably enabled somewhat somewhere in that forest of different settings in android studio which causes that flood of accessibility events. Will try to check it with someone sighted, may be that we will find that i enabled some nice visual feature which i do not need and have. ;) Thanks again. It still seems that something needs to be fixed somewhere, because that bunch of accessibility events is probably not okay in any case. I will write in case of some new info.

If you do find more out as to what causes the issue then do create a new issue for it. I agree with you there does seem to be some issue relating to that flood of accessibility events and if we can do something to prevent NVDA being the bottleneck then that would be good.

mwhapples avatar Aug 11 '22 11:08 mwhapples

Closing this issue as can't be reproduced. If this can be reproduced, it will be re-opened

seanbudd avatar Aug 12 '22 01:08 seanbudd

This unfortunately didn't fix the problem. Tested with nvda_snapshot_alpha-25756,ba743746 Peter

PeterLecky avatar Oct 11 '22 07:10 PeterLecky

Can I somehow log or may be see in nvda console that acc events and see more information about them? I tried to change logging level of nvda but nvda log does not contain more info about them. Thank you On 11. 8. 2022 13:39, mwhapples wrote:

Hello, Thank you for your time with this. I actually found that the
problem lies somewhere in configuration of my project. I created a
new project and copied my large xml resource file to it and it works
fine, no lagging, no messages in the log. Actually exploring quite
large workspace.xml which is that file which probably causes this.
Tried to copy it to my new project and problems arised also in it.
So, i probably enabled somewhat somewhere in that forest of
different settings in android studio which causes that flood of
accessibility events. Will try to check it with someone sighted, may
be that we will find that i enabled some nice visual feature which i
do not need and have. ;) Thanks again. It still seems that something
needs to be fixed somewhere, because that bunch of accessibility
events is probably not okay in any case. I will write in case of
some new info.

If you do find more out as to what causes the issue then do create a new issue for it. I agree with you there does seem to be some issue relating to that flood of accessibility events and if we can do something to prevent NVDA being the bottleneck then that would be good.

— Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/13120#issuecomment-1211873445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE36JFBV3SW6FOBAIQX2PITVYTQ6TANCNFSM5JGRRV7A. You are receiving this because you modified the open/close state.Message ID: @.***>

PeterLecky avatar Oct 11 '22 07:10 PeterLecky

@PeterLecky without steps to reproduce we still cannot re-open this issue. You can enable more detailed logging via Preferences, Advanced, Debug logging. I'm not sure if the events category will add helpful information, but it may be worth checking.

seanbudd avatar Oct 11 '22 23:10 seanbudd

Hello, I definitely found the problem. It seems that the problem happens when is the file structure tool visible. So

  1. open some xml file
  2. press alt+f1 and activate "file structure"
  3. Nvda now starts to receive a lot of accessibility events and behavs as i described in the description above.
  4. Wait few seconds until pc starts to be responsive and switch to other file and return back to large xml. Pc will freeze again and there will be again a lot of mentioned messages in NVDA log.
  5. Press f12 to switch to file structure, close it and problem will disappear.

PeterLecky avatar Aug 04 '23 15:08 PeterLecky