2016-06-09 31 views
6

我有几天的Visual Studio代码的问题:它不可能启动它(实际上,窗口几乎全是黑色),这里是我开始时的控制台输出它从一个终端:Ubuntu下的Visual Studio代码显示错误

bash: impossible de régler le groupe de processus du terminlal (-1): Ioctl() inapproprié pour un périphérique 
bash: pas de contrôle de tâche dans ce shell 
[3267:0609/135005:ERROR:buffer_manager.cc(361)] [.CommandBufferContext.Compositor-0xc0a90cb29a0]GL ERROR :GL_INVALID_ENUM : glBufferData: <- error from previous GL command 
[3267:0609/135007:ERROR:texture_manager.cc(2278)] [.CommandBufferContext.RenderCompositor-0x29650b4d9c60]GL ERROR :GL_INVALID_ENUM : glTexImage2D: <- error from previous GL command 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_ENUM : GLES2DecoderImpl::DoBindTexImage2DCHROMIUM: <- error from previous GL command 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2113)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_OPERATION : ScopedTextureBinder::ctor: was unhandled 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command 
[3267:0609/135007:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0x29650b4d96e0]GL ERROR :GL_INVALID_VALUE : ScopedTextureBinder::dtor: <- error from previous GL command 
+0

你任何机会运行Ubuntu在VirtualBox? – masimplo

+0

是的,确实如此。但几天前它运行良好。 – Greg82

+2

如果其他人遇到同样的问题......问题在于虚拟盒子客人添加。从https://www.virtualbox.org/wiki/Downloads安装V5.0.16可解决此问题。 – masimplo

回答

14

我有同样的问题,并安装virtualbox客户补充版本5.0.16真的解决了这个问题。但是,正如VS代码项目网站的FAQ部分所述,您也可以使用--disable-gpu选项运行VS代码,该选项也解决了该问题。从官方FAQ:

VS代码主窗口是空白的?

Visual Studio代码使用的Electron shell在某些GPU(图形处理单元)硬件加速时遇到问题。如果VS Code显示一个空白(空)主窗口,则可以尝试通过添加Electron --disable-gpu命令行开关来启动VS Code时禁用GPU加速。

+2

将'alias code ='code --disable-gpu''添加到'〜/ .bashrc'来自动执行此操作。 –

+0

或者在Vagrantfile中禁用3D加速。例如:'vb.customize ['modifyvm',:id,'--vram','256','--accelerate3d','off']'。见[this](http://www.virtualbox.org/manual/ch04.html#guestadd-3d)和[that](https://www.virtualbox.org/manual/ch08.html#idm3517)。 –

2

在Ubuntu上首先尝试从终端与运行Visual Studio代码:

code 

如果有任何包错误安装。然后,如果有黑色屏幕,然后去:

sudo vi /usr/share/applications/code.desktop 

禁用GPU行添加到以下几点:

Exec=/usr/share/code/code --disable-gpu %U