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

Sometimes adding a folder to a workspace causes the explorer viewet to be blank #42526

Closed
ggilmore opened this issue Jan 30, 2018 · 2 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@ggilmore
Copy link
Contributor

Issue Type

Bug

Description

I can't reliably repdroduce this, but sometimes adding a folder to a workspace (with code-insiders . -add) causes the explorer viewlet to be blank.

The stack trace is complaing about this line: https://github.com/Microsoft/vscode/blob/b543a60cffb349ab96f546afa8ce3ef9786d97ea/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts#L782 - trying to call isRoot when fs === null is an error.

I'm not sure how this can happen, but this line: https://github.com/Microsoft/vscode/blob/b543a60cffb349ab96f546afa8ce3ef9786d97ea/src/vs/workbench/parts/files/electron-browser/views/explorerView.ts#L803

has the model.findClosest call, which is apparently returning null. I don't know why it is returning null in this circumstance.

VS Code Info

VS Code version: Code - Insiders 1.20.0-insider (8cac1ac, 2018-01-30T17:19:56.812Z)
OS version: Darwin x64 17.3.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz (4 x 3300)
Load (avg) 2, 3, 3
Memory (System) 16.00GB (0.35GB free)
Process Argv /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron
Screen Reader no
VM 0%
Extensions: none
@vscodebot vscodebot bot added the workbench-diagnostics General VS Code built-in diagnostic issues label Jan 30, 2018
@nicksnyder
Copy link
Contributor

I have started to hit this issue myself.

@bpasero bpasero assigned isidorn and unassigned bpasero Jan 31, 2018
@bpasero bpasero added file-explorer Explorer widget issues workbench-multiroot Multi-root (multiple folders) issues and removed workbench-diagnostics General VS Code built-in diagnostic issues labels Jan 31, 2018
@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Jan 31, 2018
@isidorn isidorn added this to the January 2018 milestone Jan 31, 2018
@isidorn
Copy link
Contributor

isidorn commented Jan 31, 2018

@ggilmore thanks for the great analysis.
Also not sure why this is happening, but for now I simply added a null guard in the isRoot check. We also pass that array to the tree to expand elements but the tree can handle null elements so it should be fine

@ggilmore @nicksnyder please let me know if you still see the issue in tomorrow's insiders. Thanks a lot

@roblourens roblourens added the verified Verification succeeded label Feb 5, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 17, 2018
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 file-explorer Explorer widget issues verified Verification succeeded workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

5 participants