microsoft / microsoft/monaco-editor
[Bug] Error: AbstractContextKeyService has been disposed
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not 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
I'm getting the following console error when closing a modal containing a DiffEditor:
Error: AbstractContextKeyService has been disposed
at ScopedContextKeyService.contextMatchesRules (contextKeyService.js:241:19)
at MenuInfo_1.createActionGroups (menuService.js:222:45)
at MenuImpl.getActions (menuService.js:362:31)
at FromEventObservable._getValue (gutterFeature.js:47:86)
at FromEventObservable.handleEvent [as value] (utils.js:49:35)
at DebounceEmitter._deliver (event.js:916:22)
at DebounceEmitter.fire (event.js:946:18)
at DebounceEmitter.resume (event.js:1001:27)
at event.js:1035:22
at errors.js:15:27
Editor Options:
{
automaticLayout: true,
find: {
addExtraSpaceOnTop: false,
},
glyphMargin: true,
readOnly: true,
scrollbar: {
alwaysConsumeMouseWheel: false,
},
scrollBeyondLastLine: false,
quickSuggestions: true,
}
Expected Behavior
No console error.
Additional Context
This error only occurs when renderGutterMenu: true (which is the default). The error is not present in versions <= 0.47.0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the console error when closing a modal containing a DiffEditor with renderGutterMenu enabled. Trace the lifecycle through contextKeyService.js, menuService.js, and gutterFeature.js, then verify that closing the modal no longer produces the AbstractContextKeyService disposal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100