nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.11k stars 637 forks source link

When using Word Object Model in Word/Outlook, NVDA freezes and stops the keyboard from responding #10247

Closed LeonarddeR closed 11 months ago

LeonarddeR commented 5 years ago

Note, this issue is similar to --#6463. cc @bramd @dkager

Steps to reproduce:

Work with Outlook mail composition or MS Word. Seen in Office 2016, 2013 and 2010 at least. There isn't a known way to trigger this behavior, which makes this hard to reproduce reliably.

Actual behavior:

NVDA freezes and the keyboard is locked up in such a way that it is not possible to restart NVDA. The only way to break out of this situation is signing out and back in again, however this effectively means that you're losing data. As the keyboard is locked up, it is not possible to use alternatives, like running Narrator.

Expected behavior:

No freezes.

Comparison with #6463

Note that since #9208 was merged, the test case from #6463 still allows me to escape/restart NVDA. However in the Word/Outlook freezing case, there is really no other way to escape than sign out/in again.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

All recent versions of NVDA< for at least a year.

Windows version:

Several versions of Windows 10

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

Office 2010, 2013, 2016

Other information about your system:

n/a

Other questions

Does the issue still occur after restarting your PC?

Yes

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

Yes

DrSooom commented 5 years ago

There is a way to kill the nvda.exe process and then hopefully correctly closing Microsoft Outlook:

  1. Press CTRL+ALT+DEL and open the Task Manager. This should be still possible – as long as you don't try to restart NVDA by pressing CTRL+ALT+N. Perhaps CTRL+Shift+ESC for opening the Task Manager still works too, but the CTRL+ALT+DEL way is the secure one.
  2. Now right click with the mouse on the process "nvda.exe" and kill it. This should be also possible – even if Shift, CTRL and ALT hang because of NVDA.
  3. After the process was killed, close Microsoft Outlook with ALT+F4 (if possible) or again with the mouse (left click on the X in the top right corner of the window).
  4. If this doesn't work, kill the process "outlook.exe" via the Task Manager too. Unsaved e-mail drafts will get lost by this method.
  5. Now you should be able to start NVDA again via the desktop shortcut by pressing CTRL+ALT+N.

I changed the auto-save draft time to 1 minute in Microsoft Outlook especially because of this random, rare freezing bug.

LeonarddeR commented 5 years ago

I've created a try build that adds lots of extra logging when at the debug level.

dkager commented 5 years ago

Since Ctrl+Alt+Del obviously still works I wonder if there is another such hotkey that you could assign a script to to restart NVDA. It would also be interesting to know if the mouse locks up as well.

DrSooom commented 5 years ago

The mouse clicks could be influenced by the held down/hanging Shift, CTRL and/or ALT key. But for opening the context menu in the Task Manager and for the click on an entry there as well as on a button in a dialog, it doesn't really matter here if these keys are held down or not. You are still able to move the mouse cursor and interact with the GUI – as long as the held Shift, CTRL and/or ALT keys make no differences. This would be the case if you left or right click on an application icon in the taskbar (e.g. starting a new instance, open the context/application menu instead of the Jumplist etc.).

See also: https://en.wikipedia.org/wiki/Control-Alt-Delete#Windows_NT_family

bramd commented 5 years ago

@leonardder Your last commit seems to cause an error while installing add-ons:

ERROR - gui.addonGui.installAddon (21:39:39.537) - MainThread (8712):
Error installing  addon bundle from C:\Users\bram\Downloads\bluetoothaudio.nvda-addon
Traceback (most recent call last):
  File "gui\addonGui.pyc", line 539, in doneAndDestroy
  File "gui\addonGui.pyc", line 560, in installAddon
  File "gui\__init__.pyc", line 900, in __init__
  File "threading.pyc", line 1077, in name
AssertionError: Thread.__init__() not called
lukaszgo1 commented 5 years ago

Have you tried switching users with Ctrl+alt+delete, and killing NVDA process from the second account? For me it always works when freezes occurs, however I haven't experienced this exact problem

LeonarddeR commented 5 years ago

@lukaszgo1 That's an interesting approach!

@bramd The bug you reported has been fixed.

Here is a new try build that also logs isCollapsed property properly. Note that I found #10276 because of your debug logs, that's not going to fix the issue though.

bramd commented 5 years ago

@leonardder After observing many crashes over the last week it seems we have some serious issues with COM. Using the logs I can't really pinpoint where it fails exactly. My opinion for now is that we need better logging and error handling in our COM clients.

Any idea where to start with this?

LeonarddeR commented 5 years ago

To make sure, I assume you mean the comtypes com calls by NVDA, not the in process com calls?

I wonder what could possibly cause this. Could it be dynamic dispatch, or may be just an issue general to the Word object model?

In any case, I think it would help to start with having comtypes logging piped into NVDA"s log.

LeonarddeR commented 4 years ago

cc @EngineeringMario: who reported several other instances of this issue lately

LeonarddeR commented 4 years ago

Since Ctrl+Alt+Del obviously still works I wonder if there is another such hotkey that you could assign a script to to restart NVDA.

The Kill NVDA add-on by @tspivey can assist with this. Note that is still an workaround.

Adriani90 commented 4 years ago

I think these crashes might occur more often if you have lots of mails in a folder or if there are many mails with lots of flags like invitations with attachments with importance flags, emails with other different flags such as replied, atributed preview, and and and. My guess is that NVDA tries to fetch all the flags exposed by outlook for an email or an invitation and fails at some point, ending in a crash. This was also hapenning in MS Word earlier when NVDA fetched all the text atributes while navigating in tables with ctrl+alt+arrow keys etc. I think the solution is

  1. Limit the flags which should be fetched from Outlook when pressing up and down arrow in the message list to the most important flags
  2. Provide key strokes in the outlook appmodule for the flags which are not that important so that the user can request reporting of those flags when needed while navigating through the message list

or another way would be to limit the flags only to "read" and "unread" and all other flags could be displayed in a browseable window by pressing a key stroke on a specific message in the list.

lukaszgo1 commented 4 years ago

This happens when editing not when accessing list of messages and also according to the description occurs in Word.

Adriani90 commented 4 years ago

Please read the title and the conversation. Thanks.

EngineeringMario commented 4 years ago

We have quite a few customers suffering these problems while editing in Outlook or MS Word; Not really related to any version of office. This moment we expect is is a language related problem. The first tests will show this. Later this week we will suggest customers to only use the original language version. Within a few weeks we’ll know for sure. We’ll keep you informed

bhavyashah commented 4 years ago

@EngineeringMario This is a friendly reminder to provide a status update to https://github.com/nvaccess/nvda/issues/10247#issuecomment-621447311. You had said you may be able to share your updated findings in a few weeks' time. In case there is any progress on that, please do share.

a11y-spl commented 4 years ago

I am having issues with all MS Office products, Excel, Outlook, Power Point.....the applications freeze up, have to restart the machine

It is happening for V2019 & V 2020.2

feerrenrut commented 4 years ago

@a11y-spl We have several fixes for these issues in our latest alpha builds, we aim for these to be included in the 2020.3 release. We would be very interested in knowing if you are experiencing separate issues not yet fixed. If you are comfortable testing these changes please see the snapshots page: https://www.nvaccess.org/files/nvda/snapshots/

a11y-spl commented 4 years ago

When is 2020.3 planned for release ?

Amitesh


From: Reef Turner notifications@github.com Sent: Friday, August 28, 2020 3:30:19 AM To: nvaccess/nvda nvda@noreply.github.com Cc: Amitesh Agnihotri aagnihot@stevens.edu; Mention mention@noreply.github.com Subject: Re: [nvaccess/nvda] When using Word Object Model in Word/Outlook, NVDA freezes and stops the keyboard from responding (#10247)

@a11y-splhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fa11y-spl&data=02%7C01%7Caagnihot%40stevens.edu%7C0d5ae7bc7b774eb4256908d84b243787%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637341966222526469&sdata=5sEdal8cHS7SX6wQiwQN302y%2FGaEwy%2FvV8ICWGsgkLw%3D&reserved=0 We have several fixes for these issues in our latest alpha builds, we aim for these to be included in the 2020.3 release. We would be very interested in knowing if you are experiencing separate issues not yet fixed. If you are comfortable testing these changes please see the snapshots page: https://www.nvaccess.org/files/nvda/snapshots/https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.nvaccess.org%2Ffiles%2Fnvda%2Fsnapshots%2F&data=02%7C01%7Caagnihot%40stevens.edu%7C0d5ae7bc7b774eb4256908d84b243787%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637341966222526469&sdata=qz8LGWFZFzgKti0tuH4uzKpFYswbsbuMdyyZVdtuKP0%3D&reserved=0

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnvaccess%2Fnvda%2Fissues%2F10247%23issuecomment-682375198&data=02%7C01%7Caagnihot%40stevens.edu%7C0d5ae7bc7b774eb4256908d84b243787%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637341966222536462&sdata=FdSD8zSg6xVti3BE6l1K4PXdKe%2BLiv0L0OYr6vKf45I%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANMITSLUALDLXE2U2NDHPHLSC5MIXANCNFSM4IYG4YFQ&data=02%7C01%7Caagnihot%40stevens.edu%7C0d5ae7bc7b774eb4256908d84b243787%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637341966222536462&sdata=QnodL%2F%2BgpvXTWJEM8t2lPLLqBnxKov5Mr0kcHwBk5JA%3D&reserved=0.

DrSooom commented 4 years ago

@a11y-spl: I guess NVDA 2020.3 will be released in October 2020. If you don't want to test the Alpha builds (as portable copies), then please wait for the first Beta of NVDA 2020.3. It will be visible on the above mentioned snapshot page as well. Or just keep an eye on the NV Access News Page.

a11y-spl commented 4 years ago

Nope that did not work , excel is still freezing

Amitesh


From: Daniel Mayr notifications@github.com Sent: Saturday, August 29, 2020 10:09:23 AM To: nvaccess/nvda nvda@noreply.github.com Cc: Amitesh Agnihotri aagnihot@stevens.edu; Mention mention@noreply.github.com Subject: Re: [nvaccess/nvda] When using Word Object Model in Word/Outlook, NVDA freezes and stops the keyboard from responding (#10247)

@a11y-splhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fa11y-spl&data=02%7C01%7Caagnihot%40stevens.edu%7Cbbb976bc679b49d7d45d08d84c2521f0%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637343069649242437&sdata=SaFOmpb2XPvaUVfCvBnTWyF3aP3vJ1uORXwFamNtkLI%3D&reserved=0: I guess NVDA 2020.3 will be released in October 2020. If you don't want to test the Alpha builds (as portable copies), then please wait for the first Beta of NVDA 2020.3. It will be visible on the above mentioned snapshot page as well. Or just keep an eye on the [NV Access News Page[(https://www.nvaccess.org/news/).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnvaccess%2Fnvda%2Fissues%2F10247%23issuecomment-683295669&data=02%7C01%7Caagnihot%40stevens.edu%7Cbbb976bc679b49d7d45d08d84c2521f0%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637343069649252431&sdata=T15CHd5wi8JKU%2FY7PgRH7BsV7qCYmZUj%2BfwK6DZhyP4%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANMITSL5OXCJ3IGP5QBYCV3SDEDZHANCNFSM4IYG4YFQ&data=02%7C01%7Caagnihot%40stevens.edu%7Cbbb976bc679b49d7d45d08d84c2521f0%7C8d1a69ec03b54345ae21dad112f5fb4f%7C0%7C0%7C637343069649252431&sdata=cJtzgqFH5QnIr7pw7ulz1CLb05zNeaQ75ZODuHvm7R0%3D&reserved=0.

Adriani90 commented 1 year ago

@a11y-spl or any one else, are you still seeing these crashes in MS Office 2016 or 365 with NVDA last alpha version? I cannot reproduce them anymore.

The last NVDA Alpha can be downloaded from this link: https://www.nvaccess.org/files/nvda/snapshots/

Adriani90 commented 11 months ago

We didn't get any updates from people that were able to reproduce this since many years, I am closing as abandoned. Please feel free to comment on this if you are still having the issue and we can reopen.