Skip to content

Resetting configuration to factory defaults causes garbageHandler errors #13580

@seanbudd

Description

@seanbudd

Steps to reproduce:

  1. Have a custom user config for NVDA
  2. Reset your configuration to factory defaults
  3. Note the error in logs

Actual behavior:

Notable errors:

  • WARNING - config.profileUpgrader.upgrade (11:20:57.710) - MainThread (14452): Error saving configuration; probably read only file system
  • garbageHandler
INFO - core.main (11:20:40.035) - MainThread (14452):
NVDA initialized
INFO - config.ConfigManager._loadConfig (11:20:57.707) - MainThread (14452):
Loading config: None
WARNING - config.profileUpgrader.upgrade (11:20:57.710) - MainThread (14452):
Error saving configuration; probably read only file system
INFO - synthDriverHandler.setSynth (11:20:57.760) - MainThread (14452):
Loaded synthDriver oneCore
INFO - brailleInput.initialize (11:20:57.760) - MainThread (14452):
Braille input initialized
INFO - braille.initialize (11:20:57.760) - MainThread (14452):
Using liblouis version 3.21.0
INFO - braille.initialize (11:20:57.760) - MainThread (14452):
Using pySerial version 3.5
INFO - braille.BrailleHandler.setDisplayByName (11:20:57.760) - MainThread (14452):
Loaded braille display driver noBraille, current display has 0 cells.
INFO - core.resetConfiguration (11:20:57.760) - MainThread (14452):
Reverted to saved configuration
WARNING - garbageHandler.notifyObjectDeletion (11:20:57.824) - MainThread (14452):
Garbage collector has found one or more unreachable objects. See further warnings for specific objects.
Stack trace:
  File "C:\Users\sean\projects\nvda\\source\nvda.pyw", line 389, in <module>
    core.main()
  File "core.py", line 776, in main
    app.MainLoop()
  File "C:\Users\sean\projects\nvda\.venv\lib\site-packages\wx\core.py", line 2237, in MainLoop
    rv = wx.PyApp.MainLoop(self)
  File "C:\Users\sean\projects\nvda\.venv\lib\site-packages\wx\core.py", line 3407, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "core.py", line 98, in doStartupDialogs
    WelcomeDialog.run()
  File "gui\startupDialogs.py", line 124, in run
    d.ShowModal()
  File "gui\__init__.py", line 762, in Notify
    self.run()
  File "core.py", line 738, in run
    queueHandler.pumpAll()
  File "queueHandler.py", line 88, in pumpAll
    flushQueue(eventQueue)
  File "queueHandler.py", line 55, in flushQueue
    func(*args,**kwargs)
  File "eventHandler.py", line 67, in _queueEventCallback
    executeEvent(eventName,obj,**kwargs)
  File "eventHandler.py", line 279, in executeEvent
    if isGainFocus and not doPreGainFocus(obj, sleepMode=sleepMode):
  File "eventHandler.py", line 322, in doPreGainFocus
    executeEvent("focusEntered",parent)
  File "eventHandler.py", line 284, in executeEvent
    _EventExecuter(eventName,obj,kwargs)
  File "eventHandler.py", line 98, in __init__
    self.next()
  File "eventHandler.py", line 107, in next
    return func(*args, **self.kwargs)
  File "NVDAObjects\__init__.py", line 1148, in event_focusEntered
    if self.isPresentableFocusAncestor:
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\behaviors.py", line 158, in _get_isPresentableFocusAncestor
    self.isPresentableFocusAncestor = res = super(Dialog, self).isPresentableFocusAncestor
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\IAccessible\__init__.py", line 1670, in _get_isPresentableFocusAncestor
    return super(IAccessible, self).isPresentableFocusAncestor
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\__init__.py", line 1021, in _get_isPresentableFocusAncestor
    if self.presentationType in (self.presType_layout, self.presType_unavailable):
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "appModules\nvda.py", line 35, in _get_presentationType
    presType = super(NvdaDialog, self).presentationType
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\__init__.py", line 841, in _get_presentationType
    description = self.description
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\behaviors.py", line 151, in _get_description
    return self.getDialogText(self)
  File "NVDAObjects\behaviors.py", line 81, in getDialogText
    children=obj.children
  File "baseObject.py", line 42, in __get__
    return instance._getPropertyViaCache(self.fget)
  File "baseObject.py", line 146, in _getPropertyViaCache
    val=getterMethod(self)
  File "NVDAObjects\IAccessible\__init__.py", line 1123, in _get_children
    APIClass=Window.findBestAPIClass(kwargs,relation="parent") #Need a better relation type for this, but parent works ok -- gives the client
  File "NVDAObjects\__init__.py", line 226, in findBestAPIClass
    if possibleAPIClass.kwargsFromSuper(kwargs,relation=relation):
  File "NVDAObjects\IAccessible\__init__.py", line 444, in kwargsFromSuper
    acc=IAccessibleHandler.accessibleObjectFromEvent(windowHandle,objID,0)
  File "IAccessibleHandler\__init__.py", line 357, in accessibleObjectFromEvent
    return normalizeIAccessible(pacc, childID), childID
  File "IAccessibleHandler\__init__.py", line 336, in normalizeIAccessible
    pacc2 = s.QueryService(IA.IAccessible._iid_, IA2.IAccessible2)
  File "garbageHandler.py", line 28, in __del__
    notifyObjectDeletion(self)
  File "garbageHandler.py", line 69, in notifyObjectDeletion
    stack_info=True
WARNING - garbageHandler.notifyObjectDeletion (11:20:57.824) - MainThread (14452):
Deleting unreachable object <braille.BrailleHandler object at 0x0EC516B0>
WARNING - garbageHandler.notifyObjectDeletion (11:20:57.824) - MainThread (14452):
Deleting unreachable object <braille.BrailleBuffer object at 0x0EC516D0>
WARNING - garbageHandler.notifyObjectDeletion (11:20:57.824) - MainThread (14452):
Deleting unreachable object <braille.BrailleBuffer object at 0x01FD5810>
ERROR - garbageHandler._collectionCallback (11:20:57.824) - MainThread (14452):
Found at least 3 unreachable objects in run

Expected behavior:

No errors in logs

System configuration

NVDA installed/portable/running from source:

Installed and source

NVDA version:

NVDA 2022.1, NVDA 2021.3.5

Windows version:

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/memory-leakcomponent/NVDA-GUIgarbage-collectionpython garbage collection warningsp3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    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