Skip to content

Errors when locking the computer #16120

@CyrilleB79

Description

@CyrilleB79

Errors are seen sporadically when locking or unlocking Windows session.

Steps to reproduce:

  • Lock the computer, either with Windows+L or waiting for auto-lock delay.
  • Unlock the computer much later

Actual behavior:

Sometimes, errors are logged. Cause similar to what was fixed in #15400.

Error 1:

ERROR - logHandler._threadExceptHook (13:39:20.372) - watchdog (3340):
Exception in thread watchdog:
Traceback (most recent call last):
  File "C:\Users\Cyrille\AppData\Local\Programs\Python\Python311-32\Lib\threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "C:\Users\Cyrille\AppData\Local\Programs\Python\Python311-32\Lib\threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "watchdog.py", line 154, in _watcher
    _waitUntilNormalCoreAliveTimeout(waitedSince)
  File "watchdog.py", line 129, in _waitUntilNormalCoreAliveTimeout
    and not _shouldRecoverAfterMinTimeout()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "watchdog.py", line 208, in _shouldRecoverAfterMinTimeout
    if not winUser.isDescendantWindow(info.hwndActive, api.getFocusObject().windowHandle):
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Dynamic_LockScreenObject_SecureDesktopNVDAObject' object has no attribute 'windowHandle'

Error 2:

Exception ignored on calling ctypes callback function:
<function keyboardHook at 0x04591CF8>
Traceback (most recent call last):
  File "C:\Users\Cyrille\Documents\DevP\GIT\nvda\source\winInputHook.py", line 56, in keyboardHook
if not keyDownCallback(kbd.vkCode,kbd.scanCode,bool(kbd.flags&LLKHF_EXTENDED),bool(kbd.flags&LLKHF_INJECTED)):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Cyrille\Documents\DevP\GIT\nvda\source\keyboardHandler.py", line 277, in internal_keyDownEvent
hkl=ctypes.windll.user32.GetKeyboardLayout(focus.windowThreadID)
                                           ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Dynamic_LockScreenObject_SecureDesktopNVDAObject' object has no attribute 'windowThreadID'

Note: In the log, the errors are actually split among various error messages logging stderr, due to #16115. For readability, I have reformatted them grouping all the related messages in one single message.

Expected behavior:

No more error.

NVDA logs, crash dumps and other attachments:

nvda_truncated.log

System configuration

NVDA installed/portable/running from source:

Source

NVDA version:

source-master-89e33cd

Windows version:

Windows 10 22H2 (AMD64) build 19045.3930

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.

Yes. I did not take the log, but I am almost sure to have seen this issue also with an NVDA 2024.1betaX.

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

Not tested, since I have no way to reproduce the issue on-demand.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Did not run it, but I have installed regularly all the NVDA 2024.1beta which should have run it during installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions