vscode: CodeLens error: "actual command NOT FOUND"
Issue Type: Bug
I just starting seeing this very recently and it only happens sporadically. But when I click on a CodeLens (from GitLens, or references), sometimes instead of running the command I get a notification that says actual command NOT FOUND
. But if I try it again it works.
Nothing useful in the console:
VS Code version: Code - Insiders 1.40.0-insider (86405ea23e3937316009fc27c9361deee66ffbf5, 2019-11-06T16:58:49.777Z) OS version: Windows_NT x64 10.0.19018
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-6700K CPU @ 4.00GHz (8 x 4008) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 31.93GB (16.71GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 17 (13 by maintainers)
Commits related to this issue
- add logging for convertered commands #84153 — committed to microsoft/vscode by jrieken 5 years ago
- don't cache a live copy but a copy which disables (disposed) commands, #84153 — committed to microsoft/vscode by jrieken 5 years ago
Current stable. Sorry - I didn’t mean to suggest the fix didn’t work, was just adding the info I had since I’d come here to open an issue and thought it worth noting 😃
FWIW, I just tested in latest insiders and was unable to repro using the same steps that seemed to repro in stable 👍
Sounds like this is already understood/fixed, but FWIW I started seeing it today too, using the test run/debug links in the Dart extension. Clicking to run a test worked fine, then I F12’d into a definition, and came back, and now it gives the error. Seems to fit with the description above.
I have not pushed a commit for option (b) as option (a) turned out to be a little more tricky… Now, when restoring lenses from cache we show labels but the commands aren’t active, meaning you cannot click them until (re)confirmed from the extension. That means we nicely cleanup garbage and don’t get into those “command not found” situations.
Anyways, keeping this open for now. I might come up with an idea for option (a) that actually works and doesn’t leak ⛲️
So, the problem is that we cache actual code lenses, shallow copy them, dispose the true result, and later use the shallow copy to reduce flicker when switching back to a previous editor. We can (a) not dispose a model while it’s being cached or (b) restore lenses from cache but disable their commands, e.g clicking them will be a no-opt. I tend to go for (a)