If choose Windows Console support: UIA when available, NVDA logs error when exiting git bash
Steps to reproduce:
- Open git bash;
- Type
exitand press enter;
Actual behavior:
NVDA plays an error log sound and records the error message.
Expected behavior:
no errors
NVDA logs, crash dumps and other attachments:
IO - inputCore.InputManager.executeGesture (03:59:37.978) - winInputHook (11068):
Input: kb(laptop):enter
DEBUGWARNING - NVDAObjects.behaviors.LiveText._monitor (03:59:38.164) - Dynamic_WinConsoleUIAEditableTextWithAutoSelectDetectionUIA._monitorThread (13796):
Error getting or calculating new text
Traceback (most recent call last):
File "NVDAObjects\behaviors.pyc", line 391, in _monitor
File "NVDAObjects\behaviors.pyc", line 355, in _getText
File "diffHandler.pyc", line 177, in _getText
File "textInfos\__init__.pyc", line 569, in getTextInChunks
File "textInfos\__init__.pyc", line 713, in __lt__
File "textInfos\__init__.pyc", line 698, in _cmp
File "NVDAObjects\UIA\winConsoleUIA.pyc", line 162, in compareEndPoints
File "NVDAObjects\UIA\__init__.pyc", line 939, in compareEndPoints
File "monkeyPatches\comtypesMonkeyPatches.pyc", line 32, in __call__
_ctypes.COMError: (-2147220991, '事件无法调用任何订户', (None, None, None, 0, None))
DEBUG - appModuleHandler.cleanup (03:59:38.183) - MainThread (12336):
application cmd closed
DEBUG - appModuleHandler.cleanup (03:59:38.183) - MainThread (12336):
application conhost closed
ERROR - NVDAObjects.behaviors.LiveText._monitor (03:59:38.182) - Dynamic_WinConsoleUIAEditableTextWithAutoSelectDetectionUIA._monitorThread (13796):
Error getting or calculating new text
Traceback (most recent call last):
File "NVDAObjects\behaviors.pyc", line 391, in _monitor
File "NVDAObjects\behaviors.pyc", line 354, in _getText
File "documentBase.pyc", line 74, in makeTextInfo
File "NVDAObjects\UIA\winConsoleUIA.pyc", line 34, in __init__
File "NVDAObjects\UIA\winConsoleUIA.pyc", line 130, in _getBoundingRange
File "NVDAObjects\UIA\winConsoleUIA.pyc", line 34, in __init__
File "NVDAObjects\UIA\winConsoleUIA.pyc", line 115, in _getBoundingRange
AttributeError: 'NoneType' object has no attribute 'topLeft'
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (03:59:38.213) - MainThread (12336):
accRole failed: (-2147024809, '参数错误。', (None, None, None, 0, None))
System configuration
NVDA installed/portable/running from source:
Installed
NVDA version:
2022.4Alpha and 2022.3Beta4
Windows version:
Windows 10 21H2 (x64) build 19044.1889
Name and version of other software in use when reproducing the issue:
git version 2.37.3.windows.1
Other information about your system:
None
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.
Can't reproduce this with 2022.2.2, so this may be a regression.
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?
Yes
It would be good to prevent this error from occurring or to capture it as a logged warning, however this issue does not affect the user.
@seanbudd
It would be good to prevent this error from occurring or to capture it as a logged warning, however this issue does not affect the user.
NVDA keeps playing error sound when lots of errors are thrown, speech lags. It's a regression that also affects users in a way.
@cary-rowen does this affect behaviour for a released version of NVDA, which does not make error sounds?
The issue cannot be reproduced in 2022.2.3, no logs are logged at all. 2022.3Beta5 can't off the error sound to test, so I don't know what effect he has on the release version.
Update: test.bat.txt
- Download the above Test.bat.txt.
- Be sure to change the file name to t.bat.
- Execute the script.
- Quickly press Alt+Space,C to close the cmd window.
Actual performance
NVDA throws a lot of errors. This only occurs when accessing the Windows Console using UIA. @seanbudd @codeofdusk
What is the "API level" of your console (in <Kbd>Nvda+F1.)?
For me it was "API level: 2 (FORMATTED)" I manually replaced "conhost.exe" with the new version. But even the old version has the same problem.
Detailed logs: Developer info for navigator object: name: '' role: Role.TERMINAL processID: 7256 roleText: None states: State.FOCUSABLE, State.FOCUSED isFocusable: True hasFocus: True Python object: <NVDAObjects.Dynamic_WinConsoleUIAEditableTextWithAutoSelectDetectionUIA object at 0x0D22F790> Python class mro: (<class 'NVDAObjects.Dynamic_WinConsoleUIAEditableTextWithAutoSelectDetectionUIA'>, <class 'NVDAObjects.UIA.winConsoleUIA.WinConsoleUIA'>, <class 'NVDAObjects.behaviors.KeyboardHandlerBasedTypedCharSupport'>, <class 'NVDAObjects.behaviors.EnhancedTermTypedCharSupport'>, <class 'NVDAObjects.behaviors.Terminal'>, <class 'NVDAObjects.behaviors.LiveText'>, <class 'NVDAObjects.behaviors.EditableTextWithAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'NVDAObjects.behaviors.EditableTextWithSuggestions'>, <class 'NVDAObjects.behaviors.InputFieldWithSuggestions'>, <class 'NVDAObjects.behaviors.EditableTextBase'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.UIA.UIA'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>) description: '' location: RectLTWH(left=78, top=78, width=873, height=459) value: None TextInfo: <class 'NVDAObjects.UIA.UIATextInfo'> appModule: AppModule(appModuleHandler, appName='cmd', processID=7256) appModule.productName: 'Microsoft® Windows® Operating System' appModule.productVersion: '10.0.19041.2604' appModule.helperLocalBindingHandle: None windowHandle: 133524 windowClassName: 'ConsoleWindowClass' windowControlID: 0 windowStyle: 351207424 extendedWindowStyle: 786704 windowThreadID: 2260 windowText: 'C:\WINDOWS\system32\cmd.exe' displayText: '' UIAElement: <POINTER(IUIAutomationElement) ptr=0x8f43ac8 at d07d2b0> UIA automationID: Text Area UIA frameworkID: UIA runtimeID: (42, 133524, 4, -1) UIA providerDescription: [pid:8104,providerId:0x0 Main(parent link):Microsoft Console Host: Screen Information Text Area (unmanaged:conhost.exe)] UIA className: UIA patterns available: LegacyIAccessiblePattern, TextPattern diffing algorithm: <diffHandler.DiffMatchPatch object at 0x04830310> API level: 2 (FORMATTED)
What do you think about this? @codeofdusk
This issue seems to have been resolved in latest alpha version. I'll watch it.
@cary-rowen can this be closed in this case?
@Adriani90 Sorry my previous comment was wrong, I updated the steps to reproduce the issue and it is still stable to reproduce.
I think this issue has caused some confusion, it is not conducive to the problem being solved, so I will close this issue and create a new issue.