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

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

Closed
LeonarddeR opened this issue Sep 19, 2019 · 23 comments
Labels
Abandoned requested reports or updates are missing since more than 1 year, author or users are not available. app/microsoft-office bug/freeze p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority performance

Comments

@LeonarddeR
Copy link
Collaborator

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

@LeonarddeR LeonarddeR added app/microsoft-office p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Sep 19, 2019
@LeonarddeR LeonarddeR self-assigned this Sep 19, 2019
@DrSooom
Copy link

DrSooom commented Sep 19, 2019

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
Copy link
Collaborator Author

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

@dkager
Copy link
Collaborator

dkager commented Sep 20, 2019

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.

@dkager dkager closed this as completed Sep 20, 2019
@dkager dkager reopened this Sep 20, 2019
@DrSooom
Copy link

DrSooom commented Sep 21, 2019

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
Copy link
Contributor

bramd commented Sep 23, 2019

@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
Copy link
Contributor

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
Copy link
Collaborator Author

@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
Copy link
Contributor

bramd commented Oct 16, 2019

@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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@LeonarddeR
Copy link
Collaborator Author

LeonarddeR commented Apr 22, 2020

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
Copy link
Collaborator

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
Copy link
Contributor

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

@Adriani90
Copy link
Collaborator

Adriani90 commented Apr 29, 2020 via email

@EngineeringMario
Copy link

EngineeringMario commented Apr 29, 2020 via email

@bhavyashah
Copy link

@EngineeringMario This is a friendly reminder to provide a status update to #10247 (comment). 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
Copy link

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
Copy link
Contributor

@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
Copy link

a11y-spl commented Aug 28, 2020 via email

@DrSooom
Copy link

DrSooom commented Aug 29, 2020

@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
Copy link

a11y-spl commented Aug 31, 2020 via email

@Adriani90
Copy link
Collaborator

@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 Adriani90 added the Abandoned requested reports or updates are missing since more than 1 year, author or users are not available. label Nov 27, 2023
@Adriani90
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned requested reports or updates are missing since more than 1 year, author or users are not available. app/microsoft-office bug/freeze p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority performance
Projects
None yet
Development

No branches or pull requests

10 participants