Topics

How to debug when garbage collector finds unreachable objects


Cyrille
 

Hello

 

Since NVDA2020.3beta1, there are sometimes error messages about garbage collector finding unreachable objects.

This appears only sporadically. Do they need to be signalled?

How can I debug such errors?

 

You can find below an log example. It happened this time in Outlook Extended add-on. However it also may appear in other situations.

 

Cheers,

 

Cyrille

 

 

============================================

 

Log example:

 

IO - inputCore.InputManager.executeGesture (22:28:37.866) - winInputHook (38768):

Input: kb(desktop):alt+1

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.104) - MainThread (19412):

Garbage collector has found one or more unreachable objects. See further warnings for specific objects.

Stack trace:

  File "nvda.pyw", line 215, in <module>

  File "core.pyc", line 550, in main

  File "wx\core.pyc", line 2134, in MainLoop

  File "gui\__init__.pyc", line 1050, in Notify

  File "core.pyc", line 520, in run

  File "queueHandler.pyc", line 88, in pumpAll

  File "queueHandler.pyc", line 55, in flushQueue

  File "scriptHandler.pyc", line 166, in _queueScriptCallback

  File "keyboardHandler.pyc", line 516, in executeScript

  File "inputCore.pyc", line 201, in executeScript

  File "scriptHandler.pyc", line 208, in executeScript

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\__init__.py", line 502, in _genericScript_reportHeaderField

    return self.reportHeaderFieldN(n, gesture)

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\__init__.py", line 250, in reportHeaderFieldN

    self.olItemWindow = OutlookItemWindow(self.getRootDialog(), debug=debug)

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\itemWindow.py", line 36, in __init__

    self.windowType = [wt for wt in windowTypeList if getattr(self, 'is' + wt)()]

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\itemWindow.py", line 36, in <listcomp>

    self.windowType = [wt for wt in windowTypeList if getattr(self, 'is' + wt)()]

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\itemWindow.py", line 54, in isMessage

    return self.hasHeaderFieldsInThisOrder(lstCID)

  File "C:\Users\Cyrille\AppData\Roaming\nvda\addons\outlookExtended\appModules\outlook\itemWindow.py", line 187, in hasHeaderFieldsInThisOrder

    ls1 = [obj.windowControlID for obj in self.rootDialog.children if obj.windowControlID in lstCID]

  File "baseObject.pyc", line 42, in __get__

  File "baseObject.pyc", line 146, in _getPropertyViaCache

  File "NVDAObjects\IAccessible\__init__.pyc", line 1065, in _get_children

  File "NVDAObjects\__init__.pyc", line 79, in __call__

  File "NVDAObjects\IAccessible\__init__.pyc", line 660, in __init__

  File "garbageHandler.pyc", line 23, in __del__

  File "garbageHandler.pyc", line 64, in notifyObjectDeletion

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.104) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.IAccessible object at 0x06426710>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.104) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.WindowRoot object at 0x040E43D0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.window.Desktop object at 0x00FC40D0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.IAccessible object at 0x07F86C50>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.WindowRoot object at 0x07F86730>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.IAccessible object at 0x07F86B30>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.WindowRoot object at 0x07F86C90>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.IAccessible object at 0x07F868B0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.WindowRoot object at 0x07F86B90>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <NVDAObjects.IAccessible.IAccessible object at 0x012329B0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x119cbc0 at 7ccd6c0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x119cd20 at 123c440>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x36e0b88 at fb1210>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x36e0be0 at 123c210>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x36e0c38 at fb18f0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x627becc at 123c580>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x633d048 at fb1c60>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x633d0a0 at 123c6c0>

WARNING - garbageHandler.notifyObjectDeletion (22:28:38.120) - MainThread (19412):

Deleting unreachable object <POINTER(IAccessible) ptr=0x633d0f8 at 123c3f0>

ERROR - garbageHandler._collectionCallback (22:28:38.120) - MainThread (19412):

Found at least 19 unreachable objects in run