nvda
559e8b6e - Stop error sound being sometimes played when navigating quickly between folders in Windows Explorer (#12706)

Commit
4 years ago
Stop error sound being sometimes played when navigating quickly between folders in Windows Explorer (#12706) PR #10257 introduced code which removes pointless name of list which contains search results in Windows 7 start menu. To determine if we're dealing with a correct control however it is necessary to travel a lot of object ancestry. This causes the following error when navigating quickly in Windows Explorer: ERROR - NVDAObjects.__call__ (22:47:08.606) - Dummy-1 (6416): Exception in event_NVDAObject_init for <'explorer' (appName 'explorer', process ID 2552) at address 3cc63d0> Traceback (most recent call last): File "NVDAObjects\__init__.pyc", line 157, in __call__ File "appModules\explorer.pyc", line 393, in event_NVDAObject_init AttributeError: 'NoneType' object has no attribute 'parent' Description of how this pull request fixes the issue: Since this occurs for objects which are dead I've just started catching AttributeError in this block of code. Extra notes: Generally, if this were being executed from the main thread, the existing code would be completely safe as the parent property would be cached for the core cycle and therefore not change. However, from the error we can see that it is being executed on another thread "dummy-1" My guess probably a UIA worker thread. And because of this, the execution of this code could overlap the end of a main thread core cycle, thus the property cache may get cleared half way through.
Author
Parents
Loading