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

Live text handler: Handle is invalid error raised when console windows appear and disappear quickly #7250

Open
josephsl opened this issue Jun 3, 2017 · 3 comments
Labels
p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority

Comments

@josephsl
Copy link
Collaborator

josephsl commented Jun 3, 2017

Hi,

I'm seeing this error more frequently these days (perhaps due to use of some apps that pops open cmd.exe or powerShell for a quick task). Although there is no definitive reproduction steps, the end result is as follows:

  1. Perform a task (say, doing a say all).
  2. A console window pops up and closes immediately.
  3. An error tone is heard with the following traceback:

ERROR - NVDAObjects.behaviors.LiveText._monitor (11:13:42.960):
Error getting initial lines
Traceback (most recent call last):
File "NVDAObjects\behaviors.pyc", line 260, in _monitor
File "NVDAObjects\window\winConsole.pyc", line 49, in _getTextLines
File "winConsoleHandler.pyc", line 121, in getConsoleVisibleLines
File "wincon.pyc", line 70, in GetConsoleScreenBufferInfo
WindowsError: [Error 6] The handle is invalid.

Specs:

  • NvDA version: next.14089
  • OS: Windows 10 Version 1703 (15063)

Thanks.

@Brian1Gaff
Copy link

Brian1Gaff commented Jun 4, 2017 via email

@jcsteh
Copy link
Contributor

jcsteh commented Jun 5, 2017

This occurs because the console disappears before NVDA can get anything from it. Most users aren't affected by this error, since it doesn't cause any broken behaviour and we dont do error sounds in stable releases. The only thing we can do here is catch this and ignore it. I still think we should log it as a debugWarning, since it might be important in some cases.

The appropriate place to catch this is probably NVDAObjects.window.winConsole.WinConsole._getTextLines. It should probably check the error code (e.winerror), not just ignore all WindowsError exceptions.

@jcsteh jcsteh added the p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority label Jun 5, 2017
@Adriani90
Copy link
Collaborator

Adriani90 commented Apr 17, 2019

cc: @derekriemer, @LeonarddeR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p5 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

No branches or pull requests

4 participants