nvaccess / nvda

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

Outlook Crashes When Switching Mail Accounts With NVDA Running #10766

Closed trodick closed 2 years ago

trodick commented 4 years ago

Whenever I try and switch folders in Microsoft Outlook, whether that be to a different folder in the same mailbox or in a different account, NVDA crashes, doesn't restart, and Outlook goes unresponsive. Same behavior happens even though I attempted to run the COM Registration Fixing Tool.

Steps to reproduce:

  1. Open Outlook.
  2. Switch from the Inbox folder to any other folder in the same or a different mailbox.

    Actual behavior:

    NVDA crashes, and Outlook becomes unresponsive to the point that I need to close it with the Windows "This app is not responding" dialog.

    Expected behavior:

    NVDA should not crash, and Outlook should switch folders correctly.

    System configuration

    NVDA installed/portable/running from source:

    Installed

    NVDA version:

    2019.3 RC3

    Windows version:

    Windows 10, Build 1909 (18363.592)

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

    Microsoft® Outlook® for Office 365 MSO (16.0.12325.20328) 64-bit

    Other information about your system:

    20 GB RAM, Intel Core i7-1065G7 at 1.30 gHz

    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.

    2019.2.1: No error 2019.3 RC1: No error 2019.3 Beta 3/4: No error 2019.3 RC1: No error 2019.3 RC2: Problem as described nvda.log

Adriani90 commented 4 years ago

I cannot reproduce this in NVDA Version: alpha-19633, 1690296. Please try following:

  1. Update outlook via the update function in home tab / account
  2. Try to reproduce this issue with all NVDA addons disabled
  3. Rund the com fixing registration tool in NVDA menu / tool

After doing the steps above, can you see any differences?

It seems like something on your system is not working correctly, since you have a lot of OS errors in the log file. Maybe you can try to run a CCleaner to clean up your registry and restart your computer.

Please report back in case you still have this issue after the suggestions above. Otherwise it will be closed sooner or later without any result.

trodick commented 4 years ago

I still have the issue after completing all suggestions above. Log file is attached. nvda-old.log

DrSooom commented 4 years ago

I also can't reproduce it with NVDA 2019.3 RC3 Portable on Win7x64 (German) and Microsoft® Outlook® 2010 (14.0.7236.5000) SP2 MSO (14.0.7237.5000). Maybe because I disabled the e-mail preview in Outlook 2010.

trodick commented 4 years ago

@DrSooom I would have thought the best way to test for this issue would be to use the same major version of Outlook on the same major version of Windows. Additionally, I still had the issue while using nvda_source-master-169c329. I compiled it under Visual Studio 2017, Python 3.7.5, using this command:

scons source release=1
DrSooom commented 4 years ago

@trodick: It isn't bad to know which version combos still work to be able to limit the occurrence of this issue.

trodick commented 4 years ago

So I have some more context on this issue. It does not happen with Narrator, only with NVDA, and it doesn't matter how I access the new folder (whether it be by pressing Enter on its entry in the folder pane, or routing the mouse to the navigator object and left-clicking). I tried to work with the Microsoft Disability Answer Desk on it, and they said it's an NVDA issue because it worked in Narrator.

DrSooom commented 4 years ago

Is the option "Use UI automation to access Microsoft Word document controls when available" in the Advanced NVDA Settings enabled?

trodick commented 4 years ago

No, that option is disabled.

trodick commented 4 years ago

I just checked to see if the problem was solved by turning on the Use UIA checkbox, and it did not fix the issue.

DrSooom commented 4 years ago

@trodick: Used language of Windows, Microsoft Office and NVDA?

feerrenrut commented 4 years ago

The only differences between RC 1 and RC 2 and RC 3 were translations updates. While a little onerous, to ensure we are getting accurate results from the testing it would be wise to restart between tests. Sometimes old versions of DLL's can stay loaded. A restart will ensure that isn't happening. I have looked over the log, and don't see any clear indicators of what is causing the problem. The watchdog pointed to a stack during changing profiles, perhaps it is worth disabling all triggers and testing again.

trodick commented 4 years ago

@trodick: Used language of Windows, Microsoft Office and NVDA? Windows, Office, and NVDA are all set to En-US.

Adriani90 commented 4 years ago

Could you please disable all your profile triggers in NVDA and try again as suggested by Reef above? Please create a portable version out of your installed version and try to reproduce this issue.

michaelDCurran commented 4 years ago

This is not reproducible in later versions of Outlook. However, NV Access is currently working with the MS Office team to get access to debugging symbols so that we can generate readable stack traces for these kinds of issues in the future. Leaving open, but we won't be able to address this for NVDA 2020.1.

trodick commented 4 years ago

@michaelDCurran I can still reproduce this issue in the version of Outlook I have installed (16.0.12711.20000 64-bit). This is Outlook for Office 365 MSO.

feerrenrut commented 4 years ago

@trodick do you get a minidump for this crash? Could you zip and attach it to this issue?

trodick commented 4 years ago

@feerrenrut I don't get a minidump, but I do get this rather nasty set of tracebacks. I even ran the focus.appModule.dumpOnCrash() command in the Python console and still didn't get anything.

WARNING - watchdog._watcher (18:59:39.853) - watchdog (10608):
Core frozen in stack:
  File "nvda.pyw", line 215, in <module>
  File "core.pyc", line 545, in main
  File "wx\core.pyc", line 2134, in MainLoop
  File "gui\__init__.pyc", line 1030, in Notify
  File "core.pyc", line 515, in run
  File "queueHandler.pyc", line 83, in pumpAll
  File "queueHandler.pyc", line 47, in flushQueue
  File "comtypesMonkeyPatches.pyc", line 101, in newCpbDel
  File "comtypes\__init__.pyc", line 918, in __del__
  File "comtypes\__init__.pyc", line 1172, in Release
  File "comtypesMonkeyPatches.pyc", line 26, in __call__

WARNING - watchdog._watcher (18:59:54.886) - watchdog (10608):
Core frozen in stack:
  File "nvda.pyw", line 215, in <module>
  File "core.pyc", line 545, in main
  File "wx\core.pyc", line 2134, in MainLoop
  File "gui\__init__.pyc", line 1030, in Notify
  File "core.pyc", line 515, in run
  File "queueHandler.pyc", line 83, in pumpAll
  File "queueHandler.pyc", line 47, in flushQueue
  File "comtypesMonkeyPatches.pyc", line 101, in newCpbDel
  File "comtypes\__init__.pyc", line 918, in __del__
  File "comtypes\__init__.pyc", line 1172, in Release
  File "comtypesMonkeyPatches.pyc", line 26, in __call__

WARNING - watchdog._watcher (19:00:09.924) - watchdog (10608):
Core frozen in stack:
  File "nvda.pyw", line 215, in <module>
  File "core.pyc", line 545, in main
  File "wx\core.pyc", line 2134, in MainLoop
  File "gui\__init__.pyc", line 1030, in Notify
  File "core.pyc", line 515, in run
  File "queueHandler.pyc", line 83, in pumpAll
  File "queueHandler.pyc", line 47, in flushQueue
  File "comtypesMonkeyPatches.pyc", line 101, in newCpbDel
  File "comtypes\__init__.pyc", line 918, in __del__
  File "comtypes\__init__.pyc", line 1172, in Release
  File "comtypesMonkeyPatches.pyc", line 26, in __call__

ERROR - scriptHandler.executeScript (19:00:26.164) - MainThread (6436):
error executing script: <bound method GlobalCommands.script_review_currentLine of <globalCommands.GlobalCommands object at 0x07B09110>> with gesture 'numpad 8'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 205, in executeScript
  File "globalCommands.pyc", line 1046, in script_review_currentLine
  File "textInfos\offsets.pyc", line 506, in expand
  File "textInfos\offsets.pyc", line 485, in _getUnitOffsets
  File "textInfos\offsets.pyc", line 393, in _getLineOffsets
  File "NVDAObjects\__init__.pyc", line 48, in _getStoryText
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\__init__.pyc", line 1180, in _get_basicText
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\UIA\__init__.pyc", line 1451, in _get_value
  File "NVDAObjects\UIA\__init__.pyc", line 802, in _getUIACacheablePropertyValue
  File "comtypesMonkeyPatches.pyc", line 26, in __call__
_ctypes.COMError: (-2146233083, None, (None, None, None, 0, None))
ERROR - eventHandler.executeEvent (19:00:26.166) - MainThread (6436):
error executing event: typedCharacter on <appModules.outlook.UIAWithReadStatus object at 0x015BD0D0> with extra args of {'ch': '@'}
Traceback (most recent call last):
  File "eventHandler.pyc", line 155, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\__init__.pyc", line 1047, in event_typedCharacter
  File "speech\__init__.pyc", line 836, in speakTypedCharacters
  File "api.pyc", line 264, in isTypingProtected
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\__init__.pyc", line 921, in _get_isProtected
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\UIA\__init__.pyc", line 1207, in _get_states
  File "NVDAObjects\UIA\__init__.pyc", line 802, in _getUIACacheablePropertyValue
  File "comtypesMonkeyPatches.pyc", line 26, in __call__
_ctypes.COMError: (-2146233083, None, (None, None, None, 0, None))
ERROR - eventHandler.executeEvent (19:00:26.167) - MainThread (6436):
error executing event: typedCharacter on <appModules.outlook.UIAWithReadStatus object at 0x015BD0D0> with extra args of {'ch': '@'}
Traceback (most recent call last):
  File "eventHandler.pyc", line 155, in executeEvent
  File "eventHandler.pyc", line 92, in __init__
  File "eventHandler.pyc", line 100, in next
  File "NVDAObjects\__init__.pyc", line 1047, in event_typedCharacter
  File "speech\__init__.pyc", line 836, in speakTypedCharacters
  File "api.pyc", line 264, in isTypingProtected
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\__init__.pyc", line 921, in _get_isProtected
  File "baseObject.pyc", line 42, in __get__
  File "baseObject.pyc", line 145, in _getPropertyViaCache
  File "NVDAObjects\UIA\__init__.pyc", line 1207, in _get_states
  File "NVDAObjects\UIA\__init__.pyc", line 802, in _getUIACacheablePropertyValue
  File "comtypesMonkeyPatches.pyc", line 26, in __call__
_ctypes.COMError: (-2146233083, None, (None, None, None, 0, None))
Adriani90 commented 4 years ago

There is a more general discussion on this topic in #10247. I think this is very related and might occur if you have lot 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.

I will post my thought on that issue as well, and I close this issue in favor of #10247.

lukaszgo1 commented 4 years ago

@Adriani90 These are completely separate issues as evident by the fact that this was not happening in 2019.2.1 according to the OP Please reopen and more importantly read entire conversation before closing!

Adriani90 commented 4 years ago

I am reopening, however I still think this is not related to 2019.3.1. There has been alot of conversation on NVDA or even Outlook crashing when switching folders. I think this issue is rather caused by an Outlook update, any flags which might have changed for the folders between 2019.3 RC1 and RC2 testing or something else. I cannot reproduce this with NVDA alpha-20056,96cf444b and Outlook MSO (16.0.12624.20422) 32-Bit. However, it might be reproducible only on 64-bit version. I have not tested with 64-bit yet.

Adriani90 commented 4 years ago

To everyone who can reproduce, could you please re-create your Outlook profile according to this tutorial? https://www.howto-outlook.com/faq/newprofile.htm#create

I feel like this might be caused by a damaged Outlook profile.

trodick commented 4 years ago

@Adriani90 I've tried recreating my Outlook profiles several times, with no success. I did notice something interesting, though: with a clean profile, it works just fine when I only have two e-mail addresses set up. But as soon as I add a third, the third and subsequent addresses cause the crash when switching to them. My primary address is a RoadRunner, my second address is a Gmail, and my third one is a school (.edu) address hosted in GSuite.

XLTechie commented 4 years ago

Silly maybe, but have you tried adding them in different orders?

michaelDCurran commented 4 years ago

@trodick assuming the freeze is still occurring, could you please cause the freeze, and then while Outlook is frozen, go to Task manager, find Microsoft Outlook, and in its context menu, choose Create Dump File. Once the dump file is created, Task manager will show the path where it has been written. Please share this dump file with me privately via a file sharing service of your choice. Please be aware this is about 1 gb, and may contain private information. Once I have the dump file, I will be able to extract a stack trace and either hopefully identify and solve the issue in NVDA, or provide further details to the Microsoft Office team.

trodick commented 4 years ago

@michaelDCurran I have the dump file, along with a nvda.log file generated while NVDA was running in debug logging mode. I don't know a way to share this with you privately, but it is in my Dropbox. I can also throw it in Keybase if you prefer.

michaelDCurran commented 4 years ago

@trodick Thank you for the crash dump. It was helpful.

My technical findings so far: Outlook's UI Automation provider implementation for GridRow in the message list seems to get into an infinite loop when trying to collect the children of the grid row. I have a call stack which I will share with Microsoft privately. I think it keeps finding more and more children by endlessly calling GetNextSibling. However, the client part of UIAutomation core gives up way before then, and NVDA does not always necessarily block.

I still cannot reproduce this on a newer version of MS Office and Windows, though I am in the process of setting up a virtual machine to try and test with a version of Office closer to what was originally used.

trodick commented 4 years ago

@michaelDCurran I can still reproduce this issue on Microsoft® Outlook® for Microsoft 365 MSO (16.0.12827.20328) 64-bit.

a11y-spl commented 4 years ago

Is this being looked at, I am dead in the water...NVDA crashes as soon as I open any of Office 365 products

feerrenrut commented 4 years ago

A number of issues with office have been fixed in the upcoming 2020.3 release of NVDA, have you tried the beta?

DrSooom commented 4 years ago

Link to NVDA 2020.3 Beta 4.

And try to reproduce this also with disabled e-mail preview panels. Thanks.

trodick commented 3 years ago

@DrSooom Turning off the e-mail preview panes doesn't help with this. I have a new dump file and NVDA debug log, compressed into a 7-Zip file, available here: https://1drv.ms/u/s!AjqO9FsPRlMxipV9StpccwZcaCSbwQ?e=FmHMaa

I'm using NVDA 2020.3, Outlook for Microsoft 365 MSO (16.0.13231.20250 (64-bit)). Outlook does not run as administrator, nor does NVDA.

seanbudd commented 2 years ago

Is this still an issue with up to date Office and recent versions of NVDA?

seanbudd commented 2 years ago

Closing this as stale and fixed by Microsoft

trodick commented 1 year ago

This was never actually fixed by Microsoft, but I believe the fix for this issue is contained in #14759. So it'll be fixed in NVDA 2023.2. The behavior this issue discusses is similar to that detailed in #14746, with the same exact log messages.

Thanks!