You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from 0.51 to 0.52 we get an error when editor.dispose() is called. I also noticed that when I remove the onDidChangeModelContent listener we don't get the error. It seems that there is some async in here because if I dispose editor in a timeout then I don't get the error as well.
I tried our code in playground, and we couldn't reproduce which is weird too, as we don't have anything uncommon.
We dispose everything as following:
if (this.modelChangeDisposable) {
this.modelChangeDisposable.dispose(); // what editorInstance.onDidChangeModelContent returns.
}
editor.getModel().dispose();
editor.dispose();
Expected Behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
I started seeing the same problem after upgrading to 0.52.2. Here is my stack trace, in case it helps:
async.js:219 Uncaught (in promise) Canceled: Canceled
at Delayer.cancel (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:25592:115)
at Delayer.dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:25602:10)
at dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34334:13)
at DisposableStore.clear (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34417:7)
at DisposableStore.dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34401:10)
at WordHighlighter.dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:177966:19)
at WordHighlighterContribution.dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:178017:29)
at dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34334:13)
at DisposableMap.clearAndDisposeAll (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34576:7)
at DisposableMap.dispose (https://localhost:5000/static/js/vendors-node_modules_monaco-editor_esm_vs_editor_editor_main_js.chunk.js:34566:10)
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
Reproduction Steps
No response
Actual (Problematic) Behavior
After upgrading from 0.51 to 0.52 we get an error when
editor.dispose()
is called. I also noticed that when I remove theonDidChangeModelContent
listener we don't get the error. It seems that there is some async in here because if I dispose editor in a timeout then I don't get the error as well.I tried our code in playground, and we couldn't reproduce which is weird too, as we don't have anything uncommon.
We dispose everything as following:
Expected Behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: