nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
Other
2.08k stars 627 forks source link

Outlook crashes when navigating to previous/next week in calendar #12246

Open bramd opened 3 years ago

bramd commented 3 years ago

Steps to reproduce:

  1. Go to day view in the calendar
  2. Use alt+up/down arrow to navigate by week in Outlook calendar

Actual behavior:

Sooner or later (usually very soon) Outlook will crash.

Expected behavior:

Outlook should not crash.

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha-21974,4b74c7bb

Windows version:

Version 20H2 (OS Build 19042.870)

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

Outlook Version 2102 (Build 13801.20360 Click-to-Run)

Other information about your system:

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.

No, but I have seen this behavior in the past with older versions as well

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

Yes

Did you try to run the COM registry fixing tool in NVDA menu / tools?

No

seanbudd commented 3 years ago

Would you be able to share a log file? https://github.com/nvaccess/nvda/wiki/LogFilesAndCrashDumps

bramd commented 3 years ago

@seanbudd Here is a log of the crash happening. I scrubbed it from some personal data, such as events from the calendar. Please note that NVDA and Outlook are set to English, but the date and time format and Exchange server are set to Dutch .SO, you see folder names like Agenda (calendar) and dates in Dutch. From the log I gather that the crash happens when NVDA handles an on_focus event, but it doesn't tell me much about the reason this fails/crashes Outlook.

For good measure, I tried this without NVDA loaded by just tabbing around and doing alt+up/down arrow many times, Outlook did not crash. Also with Narrator active I couldn't trigger the crash.

The crash does not happen all the time. Using tab to go to an appointment first seems to increase the chance of this, but it is fairly random. Sometimes Outlook crashes three times in a row when trying to navigate, sometimes it works just fine. nvda.log

LeonarddeR commented 3 years ago

I can not reproduce this myself with Outlook 16.0.13901.20276.

seanbudd commented 3 years ago

I managed to reproduce this using this dutch calendar: webcal://agenda-abonnement.nl/schoolvakantiesnoordnederland.ics from https://agenda-abonnement.nl/ . I found hovering my cursor over an event while navigating with alt+downArrow/ alt+upArrow to regularly reproduce the crash.

seanbudd commented 3 years ago

We are sending the crash dump to microsoft to investigate

seanbudd commented 3 years ago

I've managed to reproduce this using 2020.4

bramd commented 3 years ago

Sean, thanks for putting in the effort and great to hear you reproduced this. Besides the Exchange/Office 365 calendar I also have a calendar subscription to a feed from our planning system that adds all-day events with the work I'm scheduled for. So, having a calendar subscription and/or having all-day events might be one of the causes.

michaelDCurran commented 3 years ago

Specifically the crash occurs when trying to access the SelectedStartTime or SelectedEndTime properties on a Outlook CalendarView object after pressing alt+upArrow or alt+downArrow to move to another week, but only after an appointment was previously selected. There is a curious statement on the page for the SelectedStartTime property: https://docs.microsoft.com/en-us/office/vba/api/outlook.calendarview.selectedstarttime "There is a known issue with using this property on an CalendarView object obtained otherwise - using the CurrentView property of the current Folder object (returned by the Application.ActiveExplorer.CurrentFolder property)." They may be referring to the crash here, though it is not clear. So far I cannot think of any other object model properties we can use to get the needed information. However, two workarounds could be:

  1. Add a script for alt+upArrow and alt+downArrow which sends the key through, but then also sends another downArrow and upArrow to move the selection away from the full day into a specific time and then back again. After doing this, these properties do not crash OUtlook.
  2. Get the selected times by parsing the MSAA accName property. However, this solution would be very very tricky to get right due to localization.
seanbudd commented 4 months ago

Can this still be reproduced with the latest Outlook and NVDA? Please provide the version of Outlook and NVDA you can reproduce this with.

FalkoBabbage commented 4 months ago

I have tested this with NVDA 2024.1 (portable version) with Outlook 365 MSO (Version 2403 Build 16.0.17425.20176) 64-bit and cannot reproduce it anymore

seanbudd commented 4 months ago

Thanks for confirming - closing for now. Please let us know if this can be reproduced with the latest Outlook and NVDA

bramd commented 4 months ago

@seanbudd I just was able to reproduce this in Outlook Version 2403 (Build 17425.20176 Click-to-Run) and NVDA alpha-31580,20342a38. I can reliably reproduce it by selecting an appointment I have tomorrow and pressing alt+downArrow. Log doesn't give any relevant information:

IO - inputCore.InputManager.executeGesture (11:57:41.512) - winInputHook (17700):
Input: kb(laptop):alt+downArrow
DEBUG - watchdog._waitUntilNormalCoreAliveTimeout (11:57:42.303) - watchdog (11788):
Potential freeze, waiting up to 10 seconds.
FalkoBabbage commented 4 months ago

Hi! I can also reproduce it when having an appointment selected while pressing alt+downarrow. I have checked with event tracker and event_gainFocus of CalendarView seems to be the problem, more specifically the reportFocus function. I have made a small appmodule for outlook for debugging purposes with more logging (outlook.txt) that can show it has something to do with asking the selected start/end time of the current view. I have also added a log snippet and some info of an event in eventViewer that gives some more info.

logextract.txt outlook.txt eventViewer extract.txt

bramd commented 4 months ago

@FalkoBabbage I think that this findings match with those of @michaelDCurran in https://github.com/nvaccess/nvda/issues/12246#issuecomment-833971494

I tried a very naive implementation of his suggestion to simulate arrow keypresses, but that didn't work here:

    @script(gestures=["kb:alt+upArrow", "kb:alt+downArrow"])
    def script_switchWeek(self, gesture):
        gesture.send()
        keyboardHandler.KeyboardInputGesture.fromName("downArrow").send()
        keyboardHandler.KeyboardInputGesture.fromName("upArrow").send()

Maybe the idea is right, but I'm missing something in the naive script I wrote for it.

Adriani90 commented 3 months ago

I cannot reproduce this issue with NVDA 2024.2 Beta on Outlook 365 last update. Is this reproducible only with a braille display connected? @bramd, @dkager, @burmancomp, @Emil-18 could you please test if this issue occurs for you?

seanbudd commented 3 months ago

If anyone is interested in working on this @michaelDCurran outlined a potential workaround https://github.com/nvaccess/nvda/issues/12246#issuecomment-833971494