Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code lens can sometimes overlap with code #71745

Closed
eamodio opened this issue Apr 4, 2019 · 13 comments
Closed

Code lens can sometimes overlap with code #71745

eamodio opened this issue Apr 4, 2019 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug code-lens verified Verification succeeded
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Apr 4, 2019

Issue Type: Bug

I have only seen this with today's insiders (1.34), but sometimes the code lens overlaps with the editor content. See below:
image

VS Code version: Code - Insiders 1.34.0-insider (e88a32f, 2019-04-04T19:48:00.957Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4008)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.93GB (16.20GB free)
Process Argv
Screen Reader no
VM 0%
@vscodebot
Copy link

vscodebot bot commented Apr 4, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@jrieken jrieken added code-lens info-needed Issue requires more information from poster labels Apr 5, 2019
@jrieken
Copy link
Member

jrieken commented Apr 5, 2019

😱 what... @eamodio when you see this can you use the Element dev tool to inspect the html structure? Look for codelens-decoration and monaco-visible-content-widget classes

@eamodio
Copy link
Contributor Author

eamodio commented Apr 6, 2019

The DOM of both good and bad code lens look identical -- and it looks like they are positioned appropriately, but the issue is that for some reason there is a missing view zone -- notice that there is no 2 view zone

image

Bad code lens:
image

Good code lens:
image

I think that this issue might be in some way related to #71707 since it feels like it only happens after a on-save format. Also switching to a different tab and back fixes it.

@jrieken
Copy link
Member

jrieken commented Apr 9, 2019

This just happened to me with Insiders (without fix for #71707) and it seems that one view zone is missing. Below screen shot shows how 13 isn't there...

Screenshot 2019-04-09 at 19 58 06

@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Apr 10, 2019
@eamodio
Copy link
Contributor Author

eamodio commented May 2, 2019

I don't know what changed, but I'm seeing this issue happen A LOT more frequently. And I get tripped up, because sometimes it overlaps with a blank line, and it makes me think I'm missing a blank line in that space, causing me to add a new line and only then realize that there was one, it was just this issue.

@jrieken
Copy link
Member

jrieken commented May 24, 2019

Nobody here having repro steps, right? Looking at code lens source this should only happens with an error somewhere - the calls to add and remove the viewzone/content widget pair always come together. One failing could prevent that other but it should surface as error...

@eamodio
Copy link
Contributor Author

eamodio commented May 24, 2019

I don't have any steps that for sure make it happen, but I use both the typescript references code lens and GitLens' code lens (with a custom scope to make them appear on all blocks too):

"gitlens.codeLens.scopes": [
    "document",
    "containers",
    "blocks"
  ],

With that I see the issue very often... though as I'm trying to reproduce it with today's insiders I can't seem to get it to happen. 🤷‍♂

@alexdima alexdima removed their assignment May 24, 2019
@jrieken
Copy link
Member

jrieken commented May 27, 2019

@eamodio Errors on the console?

@jrieken jrieken removed this from the May 2019 milestone May 28, 2019
@eamodio
Copy link
Contributor Author

eamodio commented Jun 7, 2019

@jrieken I can't be sure these lines were exactly related to this issue, but when I saw this issue, these were the last things in the console

workbench.main.js:239 [Extension Host] Registering disposable on object that has already been disposed. (at add (c:\Users\Eric\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:41:27))
t.log @ workbench.main.js:239
workbench.main.js:1406   ERR Data tree node not found: [object Object]: Error: Data tree node not found: [object Object]
    at Y.getDataNode (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:964:433)
    at Y.updateWidth (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:962:270)
    at e.s.instantiationService.createInstance.e [as updateWidth] (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:5250:648)
    at i.elementDisposable.i.label.onDidRender (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:5235:155)
    at d.fire (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:78:67)
    at D.render (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:4364:212)
    at D.notifyFileDecorationsChanges (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:4361:301)
    at _widgets.forEach.t (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:4358:644)
    at Array.forEach (<anonymous>)
    at _register.decorationsService.onDidChangeDecorations.e (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:4358:631)
    at e (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:74:506)
    at d.fire (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:78:67)
    at setTimeout (file:///C:/Users/Eric/AppData/Local/Programs/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:74:789)

@jrieken
Copy link
Member

jrieken commented Jun 7, 2019

Unfortunately not, those errors come form the tree not being able to find nodes by id...

@DanTup
Copy link
Contributor

DanTup commented Jul 24, 2019

I've been seeing this a lot lately, though can't see any obvious reason.

Screenshot 2019-07-24 at 5 26 40 pm

I have errors in the console, but I don't think they're related.

Screenshot 2019-07-24 at 5 27 56 pm

Could it be related to the caching of code lens that was added to reduce them jumping around?

That said, in the screenshot here the file was never modified, so I wouldn't expect the cache to have ever had only one of the two (line 10 and line 19 are the locations.. line 10 is hard to see as it overlaps void main).

@alexdima
Copy link
Member

alexdima commented Aug 14, 2019

fyi @rebornix -- this is caused by the find widget which removes a view zone id created with the previous view from the new view. Steps:

  1. Open fileA which has code lenses
  2. Open fileB which does not have code lenses
  3. Cmd+F to open the find widget (this will introduce view zone 1)
  4. Open fileA again -- the find widget will remove view zone 1 incorrectly from the new view

Kapture 2019-08-14 at 17 34 35

@alexdima alexdima added this to the August 2019 milestone Aug 14, 2019
@rebornix
Copy link
Member

@alexandrudima thanks for the quick turn around

renesansz added a commit to renesansz/vscode that referenced this issue Aug 19, 2019
* Use bat on Windows

* debt: use action bar from the panel view

* Fix microsoft/vscode-remote-release/issues/1066

* fix label

* fix: event's jsdoc typo

* Move cleanRemoteAuthority function to common location

* microsoft#78168 strict init

* microsoft#78168 strict init

* microsoft#78168 strict init

* fixes microsoft#77797

* Split formatted text renderer into own file

* Split MarkdownRenderOptions from FormattedTextRenderOptions

* Rename htmlContentRenderer -> markdownRenderer

* web - do not loose state on unload

* open exter - move into opener service

* add extension kind web

* add action only in remote

* Improve microsoft#79047 fix after feedback

* use `vscode-remote`-endpoint when importing scripts

* Added preserveCase in search side bar

* test build schedule

* Revert "test build schedule"

This reverts commit 9d4ba37.

* better check for worker/web extension

* debt - IExtensionDescription#main should be relative like all other file references

* move windowsIPC => common

* very basic support to load multiple files

* microsoft#69108
Move IWorkspaceStatsService to common
Introduce a simple service for web

* Fix microsoft#69108

* tests -remove unused services

* Move getHashedRemotesFromUri to IWorkspaceStatsService

* add and use `getWorkerBootstrapUrl`, don't use default worker factory anymore

* - use strings for view zone ids
- make it unlikely that a new view instance would accept a view zone id from a previous view instance
- remove that the find widget removes a view zone id from another view
(fixes microsoft#71745)

* add `extensionHostWorker` entry point, fixes https://github.com/microsoft/vscode-internalbacklog/issues/738

* Update uglify-es (microsoft#79044)

* Revert "Work around minifier bug (microsoft#79044)"

This reverts commit 6371cad.

* expose product configuration in product service

* use product service

* Simplify terminal commands

* Improve typings, use async

* uses getSelections and simplifed the return

* Update distro

* migrate keys from legacy layout microsoft#79020

* fix tests

* Register driver

* Teardown on sigint

* Update markdown grammar

* Still show fix all actions for fix-all actions that can fix multiple errors with multple different diagnostics

* Base web user data dir off normal one

* Update distro

* Use new browser none arg

* Make sure we compare fully normalized error codes when checking for fix all actions

* Don't include closing ] in folded range

Fixes microsoft#79142

* Register Remote Explorer when there are contributions.

* Use undefined instead of null in IEditorOpeningEvent and IOpenEditorOverride

* Change openEditor to return undefined instead of null

For microsoft#70020

* Improve jsdoc section of walkthrough

Fixes microsoft#71023

As discussed in microsoft#75033

* Add installer assets for OSS (microsoft#79045)

* Revert "Update uglify-es (microsoft#79044)"

This reverts commit e677c03.

* Work around minifier bug (microsoft#79044)

* debt - avoid some StrictNullOverride

* debt - move issue service out of common since it will not be supported in the web for now

* debt - make diagnostics service only accessible from node

* update distro

* tests - add more debug for randomly failing getUntitledWorkspacesSync

* fix mispell

* 💄

* update distro

* Simplify tasks command

* docs: fix type (microsoft#79129)

* web - add todo for potentially cyclic dependency

* Multi-select in custom tree view (microsoft#78625)

Part of microsoft#76941

The first argument is now the element that the command is executed on. The second argurment is an array of the other selected items

* update distro

* web - enable feedback contribution

* debt - more tests diag

* do not look for executables in web

* Move extension tips service to web and enable extension recommendations

* use process.setImmediate

* minor polish

* fixes microsoft#79168

* fix exports trap

* debug: prevent expression.value being undefined

fixes microsoft#79169

* update distro

* web - implement credentials provider and add API

* web - workaround clipboard issue with selection type

* better exports trapping

* fix process layer-breaker

* debt - avoid process dependency in common

* rawDebugSession: do not use process

microsoft#79210

* remove proposed API `vscode.commands.onDidExecuteCommand`

* Fix microsoft#79206

* callStack view:  do not show thread when there is only one to be compact

fixes microsoft#79121

* fix compile error

* inline product configuration in produt service

* update distro

* Fix strict error

* fix tests

* Do not expand session tree node when selecting it

fixes microsoft#79184

* Fix issue with CustomExecutions not working through tasks.executeTask (microsoft#79132)

* Do not clear out the map, and track the provided execution during execute task

* Clear provided custom executions map on execution complete

* Save last custom execution

* use safeprocess env

* Remove click code from puppeteer driver, move interfaces to common

* Reduce diff

* fix typos

* web - reuse require interceptor logic

* remove FakeCommonJSSelf

* Fix dispatch keybinding when called multiple times

* Fix layer breakage

Part of microsoft#79210

* Fixes microsoft#78975: Look for autoclosing pairs in edits coming in from suggestions

* Remove smoke tests from CI for now

* Reduce diff

* Add setting to toggle new octicon style

* Update distro

* Move puppeteer to dev deps

* Run smoke tests for darwin/linux in CI

* Make display name consistent

* Fix indent

* Improve token regex

* Add connectionToken

* update distro

* Update search stop icon

* Update checkmark so they look more like a ✓

* introduce RemoteAuthorities

* remote explorer and contribution under proposed api

* Disable smoke tests on Linux

Puppeteer needs special user setup in order to launch

* Strict init

microsoft#78168

* Strict init and mark events readonly

microsoft#78168

* Remove extra null checks in coalesce

The type system should catch these now

* Add telemetry+warning for webviews that don't have a content security policy

Fixes microsoft#79248

* Fixing comment

* Update distro

* Update distro

* Don't dispose of added object in already disposed of case

Fixes microsoft#77192

See microsoft#77192 for discussion

* Mark readonly

* Use const enums

* Marking fields readonly

* Remove webview svg whitelist

This is no longer required

* Removing test for disposable store

We have disabled this behavior

* build - disable smoketest

* Enable new Octicons style by default

* fix web platform check

* better worker error logging

* make sure to prepend vs/nls

* 💄

* fix: keep the two "Copy Path" behavior consistent

When using remote, this "Copy Path" function of SearchAction will keep the remote prefix while the FileCommand will not.

Change-Id: Ide00d2da5a695d0adbe87622643c7a600dd46432

* Load Octicons through ts instead of css import

* update distro

* Fixes microsoft#79166

* web - synchronise global state changes

* explorer input black magic

fixes microsoft#78153

* fix microsoft#72417

* Fix smoke tests

* Revert "build - disable smoketest"

This reverts commit c23cacd.

* Scope new variable to a string

* Fallback to default when cwd var cannot be resolved

Fixes microsoft#79281

* fix error when dismissing snippets picker

* add fetch file system provider

* add IStaticExtensionsService, add `staticExtensions` to embedder API

* make staticExtensions optional

* Indicate web in smoke test step

* Update octicon css logic

* Fix Octicon icons on Linux

* debug: introduce data breakpoints

* Introduce and adopt asCSSUrl

* Fixes microsoft/vscode-remote-release#687:
- remove ipc message that passes over the resolved authority
- don't go through the protocol handler when hitting 127.0.0.1

* Introduce machine overridable setting

* Seti uses TS-icon for jsonc-language. Fixes microsoft#78261

* Pick up TS rc

* xterm-addon-search@0.2.0-beta5

- Better align search with how monaco does it

Fixes microsoft#78281

* Format file

* Update distro

* Remove not null suppression

* Use dispoablestore

* Use closure instead of parameters

* Use type for IExtensionPointHandler and mark array readonly

* Marking arrays readonly in ExtensionPointUserDelta

* web - storage/lifecycle 💄

* Fix microsoft#79326, cleanup rendering Octicons bugs on Windows/Linux

* fix Markdown Preview scroll remains same after clicking on some other link

* Fix trivial zsh completion typo

* Improvements

* Drop Configure Trusted Domains command for now

* 💄

* Drop details & on -> from

* Address feedbacks

* Fix services

* Storage instead of setting. Add command for configuring

* Don't add star to quickpick

* Update UX

* Build errors and test failures

* 💄

* debt - fix some layer breakers

* Added buildReplaceStringWithCasePreserved generic function to be  used in both search side and the find side

* 💄 imports

* refactor: GlobalStorageDatabaseChannel should dependents in IStorageMainService (microsoft#79387)

* 💄

* build - have different worker extension host entrypoint, copy worker bootstrap file

* fix microsoft#76573

* fix path

* update distro

* Localization test fails on remote smoketest. Fixes microsoft#78412

* Fix microsoft/vscode-remote-release/issues/1027

* fix scope when falling back to original load function

* Wording update

* Fix: Markdown Preview scroll remains same after clicking on some other link microsoft#78465

Improves the behavior on how markdown preview behaves when clicking a link

* microsoft#79429

* TSLint: show a warning when accessing node.js globals in common|browser (microsoft#79222)

* trivial first cut

* document where globals are from

* improve rule detection

* fix "gulp tslint" task

* share rules

* enable more rules

* also add a rule for DOM

* Update trustedDomain default config

* tslint - disable some rules with comments (microsoft#79454)

* Drop unneeded action registration

* update distro

* Support using csharp in markdown preview to identify c# code blocks

* sync diagnostics, fixes microsoft#47292

* fixes microsoft#79280

* tests - more diagnostics for getUntitledWorkspaceSync() random failures

* debt - reduce dependencies diff to E6 branch

* update distro

* debt - menubar service should not live in common (microsoft#79181)

* distro

* Unify trusted domain language and use quick pick item id

* Update browser telemetry common properties

* microsoft#79454 Fix warnings

* Fix microsoft#79429

* Fix hygiene check
@mjbvz mjbvz added the verified Verification succeeded label Aug 28, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug code-lens verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants