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

Wrong result reported in Calculator #15918

Closed
CyrilleB79 opened this issue Dec 13, 2023 · 12 comments
Closed

Wrong result reported in Calculator #15918

CyrilleB79 opened this issue Dec 13, 2023 · 12 comments
Labels
blocked/needs-external-fix bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@CyrilleB79
Copy link
Collaborator

Steps to reproduce:

  1. Open Windows calculator
  2. Type 2+2 (on numeric keypad)
  3. Type numpadEnter various times
  4. Press NVDA+Tab to check the focused result field

Actual behavior:

At step 3, NVDA always reports that the displayed result is 2.

Expected behavior:

At step 3, NVDA should report the correct result, i.e. 4, 6, 8, 10, etc. When pressing NVDA+Tab at step 4, we get the result that is actually displayed.

NVDA logs, crash dumps and other attachments:

nvda.log

System configuration

NVDA installed/portable/running from source:

From source

NVDA version:

Recent master (commit 4519b89)

Windows version:

Windows 10 22H2 (AMD64) build 19045.3693

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

N/A

Other information about your system:

N/A

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.

2023.3: the issue is not present.

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?

Not tested

Cc @josephsl: Let me know if you have time to investigate this, or any hint to give for anybody else.

@cary-rowen
Copy link
Contributor

I use NVDA2023.3 to enter 2+2 and press Enter. NVDA reports it as 2, but pressing Enter multiple times can report the correct.

@CyrilleB79
Copy link
Collaborator Author

I use NVDA2023.3 to enter 2+2 and press Enter. NVDA reports it as 2, but pressing Enter multiple times can report the correct.

Yes, the issue has appeared in alpha after 2023.3 stable.

@josephsl
Copy link
Collaborator

josephsl commented Dec 13, 2023

Hi,

I need answers to the following:

  • Calculator version (it is not enough to state Windows version only as Calculator is updated via Microsoft Store)
  • Selective UIA event registration value (prefer selective, selective, global)
  • Enhanced UIA event processing (default (enabled), enabled, disabled)

A brief test (with Calculator version 11.2307.4.0 running on Windows 11 beta build 22635) indicate that UIA notification event handler may not keep up with screen text, as pressing Enter will trigger Calculator to fire notification event which NVDA handles (announces result). If my intuition is right, then we need to look at app modules that are UIA universes (Calculator, for example) and how NVDA 2024.1 (alpha, now sent to beta branch) behaves based on say, UIA event processing changes.

Thanks.

@CyrilleB79
Copy link
Collaborator Author

  • Calculator version (it is not enough to state Windows version only as Calculator is updated via Microsoft Store)

How do I get the version? I have tried in the Python console; I guess it is OK:

>>> nav.appModule.productVersion
'11.2307.4.0'

Note: it's my company's computer and I do not think that I can install from store. So maybe it's not up-to-date?

  • Selective UIA event registration value (prefer selective, selective, global)

Registration for UI Automation events and property changes: Automatic (prefer selective)

  • Enhanced UIA event processing (default (enabled), enabled, disabled)

Use enhanced event processing (requires restart) Default (Enabled)

Should I try something else or provide more information?

@lukaszgo1
Copy link
Contributor

I'd suggest disabling 'Use enhanced event processing' and checking if this is still reproducible.

@CyrilleB79
Copy link
Collaborator Author

I'd suggest disabling 'Use enhanced event processing' and checking if this is still reproducible.

@lukaszgo1, good catch!
Setting "Use enhanced event processing" on Disabled and restarting NVDA (as required) fixes the issue.

Cc @michaelDCurran

@CyrilleB79 CyrilleB79 added this to the 2024.1 milestone Dec 13, 2023
@ruifontes
Copy link
Contributor

Here did not solve the problem!
Everytime you make any operation with two equal parcels, and with only one digit, the error appears...
1+1, 2-2, 33 or 4/4 makes always the error.
1+2, 3-2, 4
5 or 7/6 don't gave error.
Also 11+11, 22-22, 33*33 or 44/44 do not gave the error...

@CyrilleB79
Copy link
Collaborator Author

Thanks @ruifontes for the feedback.

It seems that there are two issues, maybe related to each other though:

  • The one described in the initial description of this issue, that only occurs in last alpha when enhanced event processing is enabled.
  • The one that you describe, which was already present in NVDA 2023.3.

I have opened #15923 to track the issue existing in NVDA 2023.3. In the current issue, let's focus only on the new regression in last alpha.

@seanbudd seanbudd added triaged Has been triaged, issue is waiting for implementation. p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Dec 18, 2023
@seanbudd
Copy link
Member

Based on Joseph's comment #15918 (comment) it appears that Calculator is sending a notification that the result has been updated before it is available.

If this is the case, that the notification is being fired early, this needs to be reported to Microsoft.

@josephsl
Copy link
Collaborator

Hi,

I have raised microsoft/calculator#2097 in response to #15923. At the moment when I test with enhanced event processing turned on, NVDA does announce updated result whenever I press Enter key (so it says 6, 8, etc.). The fix included in Windows App Essentials 24.01 meant to fix #15923 somehow fixes this one in that NVDA will announce updated results. Do let us know if using Windows App Essentials 24.01 resolves this.

Thanks.

@seanbudd seanbudd removed this from the 2024.1 milestone Jan 14, 2024
@Qchristensen
Copy link
Member

Are people still encountering this? I cannot currently reproduce this, testing with Calculator 11.2405.2.0 (from Calculator settings then use object navigation) and NVDA 2024.3 on Windows 11 (64-bit) Version: 23H2, Build: 22631.4037

Note that #15923 is still present.

@CyrilleB79
Copy link
Collaborator Author

Testing with '11.2405.2.0'
I cannot reproduce either.

The result "4" is not reported, but this is due to #15923. Then, the results 6, 8, 10, etc. are correctly reported.

Closing as resolved; I do not know exactly when and why.

@github-actions github-actions bot added this to the 2024.4 milestone Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/needs-external-fix bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

7 participants