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

The sidebar is throwing errors like crazy in VSCode 1.6.0 #13447

Closed
JamesMessinger opened this issue Oct 10, 2016 · 30 comments
Closed

The sidebar is throwing errors like crazy in VSCode 1.6.0 #13447

JamesMessinger opened this issue Oct 10, 2016 · 30 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded

Comments

@JamesMessinger
Copy link

JamesMessinger commented Oct 10, 2016

This behavior started happening after upgrading to VSCode 1.6.0 today.

  • VSCode Version: Code 1.6.0 (e52fb0b, 2016-10-10T18:28:55.412Z)
  • OS Version: Darwin x64 16.0.0
  • Extensions: QassimFarid.ejs-language-support-0.0.1, dbaeumer.vscode-eslint-1.0.7, donjayamanne.githistory-0.1.0, naumovs.node-modules-resolve-1.0.2, nwallace.peep-0.0.5

Steps to Reproduce:

1. Search pane is blank

  1. Launch Visual Studio Code
  2. Click the magnifying glass on the left side to switch to the "Search" pane
  3. The search pane is empty. No search fields (see screenshot)
    screen shot 2016-10-10 at 3 57 51 pm

2. Cannot read property 'focus' of undefined

  1. Launch Visual Studio Code
  2. Press cmd+shift+f to trigger the workbench.view.search command
  3. An error occurs (see screenshot)
    screen shot 2016-10-10 at 3 59 37 pm

3. Cannot read property 'toCustomLabel' of undefined

  1. Launch Visual Studio Code
  2. Press cmd+shift+f to trigger the workbench.view.search command
  3. An error occurs (see screenshot)
    screen shot 2016-10-10 at 4 03 42 pm

4. Cannot read property 'setWidth' of undefined

  1. Launch Visual Studio Code
  2. Press cmd+b to trigger the workbench.action.toggleSidebarVisibility command
  3. An error occurs (see screenshot)
    screen shot 2016-10-10 at 4 07 18 pm
@JamesMessinger
Copy link
Author

Here are the error messages in the devtools console....

screen shot 2016-10-10 at 4 10 38 pm

@JamesMessinger
Copy link
Author

btw... these errors happen even with the --disable-extensions argument, so they don't appear to be caused by an extension

@chrmarti
Copy link
Contributor

Does code --force-gpu-rasterization help any?

@TimMensch
Copy link

Just ran into this myself with 1.6. With --force-gpu-rasterization I get:

Cannot read property 'toCustomLabel' of undefined

@JamesMessinger
Copy link
Author

@chrmarti - I tried code --force-gpu-rasterization and code --force-gpu-rasterization --disable-extensions. Neither one fixed the problem :(

@chrmarti
Copy link
Contributor

Possibly related to #12709

@TimMensch
Copy link

I at least do not have the REST Client extension installed, and --disable-extensions doesn't fix the issue.

@chrmarti
Copy link
Contributor

@TimMensch Which OS and OS version are you running?

@TimMensch
Copy link

Windows 10/x64, version 1.6.0, 2016-10-10T18:37:40

@TimMensch
Copy link

Sorry, OS version: Windows 10 Pro, 1511, 10586.589

@TimMensch
Copy link

@chrmarti I've got another Windows 10 system, but I've not let VS Code update on it for fear of losing search on both.

@JamesMessinger
Copy link
Author

JamesMessinger commented Oct 10, 2016

I uninstalled all of my extensions, just to see if that helped, but no luck.

@chrmarti
Copy link
Contributor

Could you append your keybindings.json? There appears to be a bug with the new commands in the Search viewlet. @sandy081

@TimMensch
Copy link

I'm not modifying the "Find" key:

[
    { "key": "ctrl+]", "command": "editor.action.jumpToBracket", "when": "editorTextFocus" },
    { "key": "ctrl+alt+b", "command": "editor.action.format","when": "editorTextFocus" },
    { "key": "ctrl+w", "command": "workbench.action.closeActiveEditor" },
    { "key": "alt+w","command": "expand_region" },
    { "key": "alt+left",         "command": "workbench.action.focusPreviousGroup" },
    { "key": "alt+right",        "command": "workbench.action.focusNextGroup" },
    { "key": "ctrl+'", "command": "esQuotes.transformBetweenSingleDoubleQuotes" },
    { "key": "ctrl+alt+left",         "command": "workbench.action.focusPreviousGroup" },
    { "key": "ctrl+alt+right",        "command": "workbench.action.focusNextGroup" },
    { "key": "ctrl+shift+'", "command": "esQuotes.transformToTemplateString" },
    { "key": "ctrl+alt+d ctrl+alt+t", "command":"docthis.traceTypeScriptSyntaxNode"}
]

@TimMensch
Copy link

@chrmarti For fun I deleted my keybindings and it still comes up with the same error, and selecting View: Show Search from the command palette also brings up the same error.

@JamesMessinger
Copy link
Author

JamesMessinger commented Oct 10, 2016

@chrmarti - Yep. I was just about to post that.

I completely uninstalled VSCode and deleted my ~/Library/Application Support/Code folder. Then I reinstalled VSCode, and the errors were gone. 👍

Then I restored my custom keybindings and restarted VSCode, and the errors were back. 👎

So I started removing custom keybindings one-by-one and restarting VSCode after each one until I found the culprit. Here is the keybinding that's causing the error (for me, anyway)...

// Place your key bindings in this file to overwrite the defaults
[
  {
    "key": "alt+cmd+w",
    "command": "workbench.action.closeAllEditors"
  }
]

@TimMensch
Copy link

@BigstickCarpet @chrmarti Sure enough, success:

    { "key": "alt+w","command": "expand_region" },

This was the culprit for me. It didn't fix things to just delete it; I had to restart VS Code between tests.

@chrmarti
Copy link
Contributor

A workaround would be to make sure the following commands are bound to at least one (arbitrary) key combination:

  • "toggleSearchCaseSensitive"
  • "toggleSearchWholeWord"
  • "toggleSearchRegex"

And, as you mentioned, a restart is necessary to make it work.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels Oct 10, 2016
@TimMensch
Copy link

Awesome sleuthing. 🕵️ This also works for me:

    { "key": "alt+w","command": "expand_region", "when":"editorFocus" },

I added a "when" clause to my keybinding so it wouldn't kill the other binding, just hide it when the editor is active.

@chrmarti
Copy link
Contributor

/cc @isidorn

@carmanchris31
Copy link

carmanchris31 commented Oct 10, 2016

Problem for me was also a custom keybinding:
{ "key": "cmd+alt+r", "command": "workbench.action.focusSideBar" },

Presumably because it overwrites the default for toggleFindRegex and thus invalidates the requirements specified by @chrmarti :
{ "key": "alt+cmd+r", "command": "toggleFindRegex", "when": "editorFocus" },

@sandy081 sandy081 added the candidate Issue identified as probable candidate for fixing in the next release label Oct 11, 2016
@sandy081 sandy081 added this to the September Recovery 2016 milestone Oct 11, 2016
@eduardonunesp
Copy link

eduardonunesp commented Oct 11, 2016

To me it only happens when assigns to cmd+alt+r, for instance:

left menu empty

  {
    "key": "cmd+alt+r",
    "command": "editor.action.format"
  }

left menu ok

  {
    "key": "cmd+r",
    "command": "editor.action.format"
  }

@sandy081
Copy link
Member

@eduardonunesp On Mac, cmd+alt+r is the short cut for enabling reg-ex toggleSearchCaseSensitive in Search view which is taken by editor.action.format. I have fix in ready and is already available in Insiders. Temporary workaround is to assign a different shortcut for toggleSearchCaseSensitive.

Thanks

@OliverJAsh
Copy link
Contributor

Problem for me was due to:

{ "key": "alt+cmd+c", "command": "workbench.files.action.collapseFilesExplorerFolders" }

@joaomoreno joaomoreno added this to the September Recovery 2016 milestone Oct 12, 2016
@d4v1dst
Copy link

d4v1dst commented Oct 12, 2016

Same here on MacOS El Capitan

my keybindings.json was

[
    { "key": "shift+cmd+7",                 "command": "editor.action.commentLine"},
    { "key": "alt+`",                 "command": "workbench.action.navigateBack" },
    { "key": "shift+alt+`",                 "command": "workbench.action.navigateForward" },
    { "key": "cmd+alt+c",           "command": "workbench.action.git.input-commit" },
    { "key": "cmd+alt+p",           "command": "workbench.action.git.push" },
    { "key": "cmd+m",          "command": "editor.action.jumpToBracket"}
]

After delete the custom keybindings and restart, everything works fine.

@sandy081
Copy link
Member

@d4v1dst Sorry for that. This is because of the key-binding cmd+alt+c.

sandy081 added a commit that referenced this issue Oct 13, 2016
@sandy081
Copy link
Member

Verification:

Customize following default key bindings to other actions

Mac

  • alt+cmd+c
  • alt+cmdr
  • alt+cmdw

Windows/Linux

  • alt+c
  • alt+r
  • alt+w

Verify that Search view is opening without any errors

@bogdan-d
Copy link

bogdan-d commented Oct 13, 2016

For me, these custom keybindings were the issue, after removing them, the search view worked:

{ "key": "shift+alt+c", "command": "toggleFindCaseSensitive", "when": "editorFocus" },
{ "key": "shift+alt+w", "command": "toggleFindWholeWord", "when": "editorFocus" },

Also, I need to mention that I have another custom key bound to alt+c, that before the update of vs code to 1.6.0, was a free key:
{ "key": "alt+c", "command": "vstortoise.svnCommit" },

@sandy081
Copy link
Member

@lypscan alt+c was always taken to toggle case sensitive option in Editor find widget. With your customization, this key binding was overridden

@bogdan-d
Copy link

@sandy081 yes, now I remember... In any case, the error seems to manifest itself whenever I override the default keybindings for: toggleFindCaseSensitive, toggleFindWholeWord, toggleFindRegex.

@egamma egamma removed the candidate Issue identified as probable candidate for fixing in the next release label Oct 13, 2016
@roblourens roblourens added the verified Verification succeeded label Oct 13, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests