Locking+unlocking leaks `SignalTracker`s
When running
{imports.system.gc(); imports.misc.signalTracker.SignalManager.getDefault()._signalTrackers.size}
before and after locking the screen, a small increase (+6) in the number of active SignalTracker
s can be seen for every such cycle.
To identify potential sources of this I tried storing the old signal trackers map before locking the screen via
global.oldmap = new Map(imports.misc.signalTracker.SignalManager.getDefault()._signalTrackers);
and then after locking+unlocking logging the new SignalTracker
s:
{imports.system.gc(); [...imports.misc.signalTracker.SignalManager.getDefault()._signalTrackers].filter(([k,v]) => !global.oldmap.has(k)).forEach(([k,v]) => {log(`tracker for: ${k}`); log([...v._map.keys()]);})}
The output of that is something like:
tracker for: [0x55e030414dc0 StEntry.login-dialog-prompt-entry ("")]
[object Object delegate for 0x55e02e756030 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu ("")]
tracker for: [0x55e0300fcf10 Gjs_ui_popupMenu_PopupMenuItem.popup-menu-item:first-child ("")]
[object Object delegate for 0x55e02e756030 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu ("")]
tracker for: [object Object delegate for 0x55e02e756030 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu ("")]
[0x55e0300fcf10 Gjs_ui_popupMenu_PopupMenuItem.popup-menu-item:first-child ("")],[0x55e02f063d10 Gjs_ui_popupMenu_PopupMenuItem.popup-menu-item:last-child ("")],[object Object]
tracker for: [0x55e02f063d10 Gjs_ui_popupMenu_PopupMenuItem.popup-menu-item:last-child ("")]
[object Object delegate for 0x55e02e756030 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu ("")]
tracker for: [0x55e02e756030 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu ("")]
[object Object]
tracker for: [object (DISPOSED) instance wrapper GIName:Gdm.UserVerifierChoiceListProxy jsobj@0x4017d2f64e8 native@0x55e02c43fab0]
[object Object]
tracker for: [0x55e02cf2c080 Gjs_status_keyboard_LayoutMenuItem.popup-menu-item:first-child ("")]
[object Object delegate for 0x55e028fd0780 Gjs_ui_boxpointer_BoxPointer.popup-menu-boxpointer popup-menu panel-menu ("")]
So the problem seems to be StEntry
which keeps all the boxpointer stuff alive as well and UserVerifierChoiceListProxy
. These also accumulate with repeated iterations. The keyboard one does not accumulate and does not seem to indicate any issue.