microsoft / microsoft/monaco-editor

[Bug] Error: InstantiationService has been disposed

Open
#4,612 15 comments 10 reactions 0 assignees View on GitHub

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?
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, AND I cant right-click to open context menu:

Error: InstantiationService has been disposed
    at InstantiationService._throwIfDisposed (vendor-Be3X1PyW.js:5493:725)
    at InstantiationService.createInstance (vendor-Be3X1PyW.js:5493:1454)
    at vendor-Be3X1PyW.js:5503:89593
    at createInstantHoverDelegate (vendor-Be3X1PyW.js:5059:42909)
    at new ActionBar (vendor-Be3X1PyW.js:5104:8221)
    at new QGe (vendor-Be3X1PyW.js:5104:17027)
    at Object.render (vendor-Be3X1PyW.js:5469:1417)
    at ContextView.show (vendor-Be3X1PyW.js:5019:18739)
    at StandaloneContextViewService.showContextView (vendor-Be3X1PyW.js:5058:908)
    at StandaloneContextViewService.showContextView (vendor-Be3X1PyW.js:5501:2414)
    at ContextMenuHandler.showContextMenu (vendor-Be3X1PyW.js:5469:528)
    at StandaloneContextMenuService.showContextMenu (vendor-Be3X1PyW.js:5469:4281)
    at ContextMenuController_1._doShowContextMenu (vendor-Be3X1PyW.js:5536:8326)
    at ContextMenuController_1.showContextMenu (vendor-Be3X1PyW.js:5536:7319)
    at ContextMenuController_1._onContextMenu (vendor-Be3X1PyW.js:5536:7115)
    at UniqueContainer.value (vendor-Be3X1PyW.js:5536:5893)
    at InteractionEmitter._deliver (vendor-Be3X1PyW.js:4866:3915)
    at InteractionEmitter.fire (vendor-Be3X1PyW.js:4866:4365)
    at InteractionEmitter.fire (vendor-Be3X1PyW.js:4951:25168)
    at ni.onContextMenu (vendor-Be3X1PyW.js:4951:21788)
    at ViewUserInputEvents.emitContextMenu (vendor-Be3X1PyW.js:4919:60223)
    at ViewController.emitContextMenu (vendor-Be3X1PyW.js:4919:47731)
    at TouchHandler._onContextMenu (vendor-Be3X1PyW.js:4886:60775)
    at vendor-Be3X1PyW.js:4886:57552
    at HTMLDivElement.<anonymous> (vendor-Be3X1PyW.js:4883:62874)
    at vendor-Be3X1PyW.js:4862:13

Editor Options:

{
  wordWrap: 'on',
  automaticLayout: true,
  scrollBeyondLastLine: true,
  scrollBeyondLastColumn: 0,
  renderLineHighlightOnlyWhenFocus: true,
  scrollbar: {
    verticalScrollbarSize: 8,
    horizontalScrollbarSize: 8,
  },
  smoothScrolling: true,
  padding: {
    top: 18,
    bottom: 18,
  },
  minimap: {
    enabled: false,
  },
  unicodeHighlight: {
    invisibleCharacters: false,
    ambiguousCharacters: false,
  },
  pasteAs: {
    enabled: false,
  },
  experimentalInlineEdit: {
    enabled: true,
    showToolbar: "always"
  },
} 
Expected Behavior

No response

Additional Context

The error/issue is not present in versions <= 0.49.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a modal containing a DiffEditor: close the modal, then right-click in the editor and inspect the InstantiationService stack trace. The payload names only the generated vendor-Be3X1PyW.js bundle and context-menu path, with no source file, reproduction code, or test. Done means the error and failed context menu no longer occur in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.