microsoft / vscode

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

visual studio code auto closes when opening #212503

Closed Osderda closed 1 week ago

Osderda commented 3 weeks ago

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

https://github.com/microsoft/vscode/assets/68977883/6b23f9ce-14a6-4114-ab7b-147a36c6cc99

image

huzaifamk commented 3 weeks ago

Same thing happening to me on Ubuntu 22.04.

Jkimishere commented 3 weeks ago

Same thing happens on windows 10. My vscode opens for a few seconds, then closes

on inspecting the logs the closest thing to an error is this:

sharedprocess.log
(same thing repeats from above)
....
2024-05-11 21:01:05.332 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.562 [info] Getting Manifest... ms-python.python
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.630 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.631 [warning] [cmake-tools]: Couldn't find message for key cmake-tools.configuration.cmake.options.advanced.statusBarLength.description.
2024-05-11 21:01:06.656 [info] Waiting for already requested installing extension ms-python.python ms-python.vscode-pylance

No extensions enabled.

DavudSafarli commented 2 weeks ago

any fix so far?

Jkimishere commented 2 weeks ago

I encountered a similar issue and was able to resolve it by creating a new directory in a different location. In my specific case, I had a Jupyter notebook file open when VSCode closes. Switching to a new directory (Which closes the Jupyter notebook) seemed to address the problem. I am not sure if this issue is directly related to the Jupyter notebook, but at least the issue is fixed ¯_(ツ)_/¯

Osderda commented 1 week ago

When I started it with the console window, I saw that it kept a log like this and closed itself. "Failed to create null handle: The system cannot find the specified file." I not sure exactly what you're looking for. image

Osderda commented 1 week ago

Oh omg. The system crashed because it couldn't find the driver. Solution: Start cmd administrator and paste these two codes in order and try opening VSCode again. 1) sc create null binPath= C:\Windows\System32\drivers\null.sys type= kernel start= auto error= normal OUT> [SC] CreateService SUCCESS

2) sc start null OUT> SERVICE_NAME: null TYPE : 1 KERNEL_DRIVER STATE : 4 RUNNING (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 PID : 0 FLAGS :