Closed
Description
Describe the problem
I am seeing warnings related to the increasing number of event listeners. I could reproduce it with RC7.
To reproduce
- Open Settings JSON,
- Zoom in/out ~200 times
init (editor-manager.ts:61)
_postConstruct (instantiation.ts:40)
resolveInstance (instantiation.ts:68)
(anonymous) (resolver.ts:102)
_injectProperties (instantiation.ts:19)
resolveInstance (instantiation.ts:63)
(anonymous) (resolver.ts:102)
resolve (resolver.ts:140)
(anonymous) (container.ts:382)
__webpack_modules__.../node_modules/inversify/lib/container/container.js.Container._get (container.ts:354)
__webpack_modules__.../node_modules/inversify/lib/container/container.js.Container.get (container.ts:246)
(anonymous) (preference-transaction-manager.ts:279)
doSetPreference (abstract-resource-preference-provider.ts:118)
setPreference (abstract-resource-preference-provider.ts:112)
setWithConfigName (user-configs-preference-provider.ts:101)
setPreference (user-configs-preference-provider.ts:109)
set (preference-service.ts:420)
savePreference (settings.ts:249)
save (settings.ts:281)
await in save (async)
execute (edit-contributions.ts:65)
await in execute (async)
executeCommand (command.ts:336)
await in executeCommand (async)
executeKeyBinding (keybinding.ts:478)
run (keybinding.ts:568)
(anonymous) (frontend-application.ts:239)
root WARN Possible Emitter memory leak detected. 264 listeners added. Use event.maxListeners to increase the limit (175). MOST frequent listener (89):
e.log @ logger-protocol.ts:110
(anonymous) @ logger-frontend-module.ts:41
(anonymous) @ logger.ts:312
(anonymous) @ logger.ts:304
Promise.then (async)
log @ logger.ts:299
i @ logger.ts:45
checkMaxListeners @ event.ts:248
_event._event.Object.assign.maxListeners @ event.ts:190
init @ editor-manager.ts:61
(anonymous) @ instantiation.ts:40
t.resolveInstance @ instantiation.ts:68
(anonymous) @ resolver.ts:102
t.length.a @ instantiation.ts:19
t.resolveInstance @ instantiation.ts:63
(anonymous) @ resolver.ts:102
t.resolve @ resolver.ts:140
(anonymous) @ container.ts:382
e._get @ container.ts:354
e.get @ container.ts:246
(anonymous) @ preference-transaction-manager.ts:279
doSetPreference @ abstract-resource-preference-provider.ts:118
setPreference @ abstract-resource-preference-provider.ts:112
s @ user-configs-preference-provider.ts:101
setPreference @ user-configs-preference-provider.ts:109
set @ preference-service.ts:420
savePreference @ settings.ts:249
save @ settings.ts:287
async function (async)
save @ settings.ts:254
execute @ edit-contributions.ts:77
async function (async)
execute @ edit-contributions.ts:70
executeCommand @ command.ts:336
async function (async)
executeCommand @ command.ts:335
executeKeyBinding @ keybinding.ts:478
run @ keybinding.ts:568
(anonymous) @ frontend-application.ts:239
logger-protocol.ts:110 root WARN at b._event._event.Object.assign.maxListeners [as onDidChangeCurrentWidget] (file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:2310677)
at s.init (file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:2747135)
at file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:8415749
at Object.t.resolveInstance (file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:8415821)
at file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:8417509
at Array.map (<anonymous>)
at t.length.a (file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:8415476)
at Object.t.resolveInstance (file:///Applications/Arduino%20IDE.app/Contents/Resources/app/lib/bundle.js:2:8415568)
Expected behavior
Event listeners do not leak.
Arduino IDE version
rc7
Operating system
macOS
Operating system version
12.3.1
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details