microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.42k stars 28.62k forks source link

Can't run certain apps in terminal #222247

Closed Master811129 closed 1 month ago

Master811129 commented 1 month ago

Does this issue occur when all extensions are disabled?: Yes

Installed the app as a classic Snap. It looks like that some apps can't be run from VSCode's terminal. CPU goes 100% and ram gets filled up and crashes the system:

NO extensions BTW

Steps to Reproduce:

  1. open a terminal in code (snap)
  2. run dolphin as an example and CPU goes 100%

Screencast: ignore the flashing

Ignore the flashing

https://github.com/user-attachments/assets/d9429512-9256-44bf-96fe-d9e72c4861a8

meganrogge commented 1 month ago

does this happen if you run that in an external terminal?

Master811129 commented 1 month ago

No, It only happens in vscode terminal. I believe this occurs due to snap sandbox blocking something.

deepak1556 commented 1 month ago

Merging to https://github.com/microsoft/vscode/issues/179086

The library variables we set like GTK_PATH, GIO_MODULE_DIR interfere with launching external applications.

Master811129 commented 1 month ago

The library variables we set like GTK_PATH, GIO_MODULE_DIR interfere with launching external applications.

The app I ran here was dolphin which is a Qt app not GTK. Are you sure that this is related to my problem? I dont have many GTK apps installed on my system but gnome-disks and lutris work fine from VSCode(snap) terminal.

Tried with more qt apps some of them just won't do anything, Halt the termianl and use 100% CPU and some of them will open up without issues. Note that all of them work fine on my normal Konsole its just vscode's terminal.

AmeyaVS commented 1 month ago

I suggest dumping the environment variables in your default terminal into a file. Then dump the environment variables in the VSCode terminal to another file. Compare the 2 files, and observe if any new environment variable related to Qt/Gtk by either unsettling them in the VSCode terminal to see if any fixes the issue.