Windows 10/11 Calculator: "list index out of range" when entering expressions in portable NVDA with Calculator compact overlay on #14679
Labels
app/windows-interface
Interactions between NVDA and the default Windows GUI
p4
https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
triaged
Has been triaged, issue is waiting for implementation.
Milestone
Hi,
Discovered while testing parts of Windows App Essentials add-on in hopes of catching out of date documentation:
Steps to reproduce:
Prerequisites: a portable copy of NVDA with no add-ons, Windows 10/11 Calculator:
Actual behavior:
Calculations are announced in installed copy but does not on portable copy, resulting in the following traceback:
ERROR - eventHandler.executeEvent (08:53:02.104) - MainThread (22024):
error executing event: UIA_notification on <NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionUIA object at 0x0418D910> with extra args of {'notificationKind': 4, 'notificationProcessing': 1, 'displayString': 'Display is 15', 'activityId': 'DisplayUpdated'}
Traceback (most recent call last):
File "eventHandler.pyc", line 300, in executeEvent
File "eventHandler.pyc", line 101, in init
File "eventHandler.pyc", line 110, in next
File "appModules\calculator.pyc", line 94, in event_UIA_notification
IndexError: list index out of range
Expected behavior:
Both installed and portable copy announces calculations and results with compact overlay on or off.
NVDA logs, crash dumps and other attachments:
System configuration
NVDA installed/portable/running from source:
Installed and portable
NVDA version:
alpha-27763,d957a684
Windows version:
Windows 11 22H2 build 22621.1265
Name and version of other software in use when reproducing the issue:
Windows Calculator 11.2210.0.0
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.
Reproducible in 2022.4 and 2023.1 beta 2
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 applicable
Technical details:
UIA notification event handler inside Calculator app module performs object hierarchy traversal to locate results. While useful, object traversal has become an issue with changes to UIA tree in places such as Notepad and Calculator. The traceback is caused by the fact that, in Calculator compact overlay interface, NVDA cannot locate child elements of the foreground window properly. A solution exists in the form of using UIA's own find descendants method, the method employed in places such as File Explorer to locate elements such as status bar (see PR #14622). The solution also removes the need to check Calculator versions.
Thanks.
The text was updated successfully, but these errors were encountered: