Skip to content

unable to open filename.js: Model is disposed! #133923

@chrisdias

Description

@chrisdias
Version: 1.61.0-insider (user setup)
Commit: 5991e3c4b97eca5568069bf3e0910ab693ad3549
Date: 2021-09-27T05:16:11.989Z
Electron: 13.4.0
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19043

I have inlayHints turned on for TypeScript, as well as bracket pair and guide colorization.

I was searching through a number of files, clicking on each one pretty quickly, and then at some point I started getting an error Unable to open file : Model is disposed!.

clone the TypeScript repository
set the following settings:

    "editor.bracketPairColorization.enabled": true,
    "editor.guides.bracketPairs": true,
    "editor.inlayHints.enabled": true,
    "typescript.inlayHints.variableTypes.enabled": true,
    "typescript.inlayHints.enumMemberValues.enabled": true,
    "typescript.inlayHints.parameterTypes.enabled": true,
    "typescript.inlayHints.functionLikeReturnTypes.enabled": true,

In the Search View, look for const enum (this is the exact query i was using)
Now pretty rapidly start clicking on files in the search results pane
Eventually (after clicking on like 15 to 20 files), especially after opening something large like tsc.js, you'll get the Model is disposed error.

image

When I checked the console for errors, I found this stack trace that referenced bracketMatching.ts a few times, so I'm not sure if its related or coincidence.

image

also saw this call stack

image

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions