mintty / wsltty

Mintty as a terminal for Bash on Ubuntu on Windows / WSL
Other
3.12k stars 104 forks source link

Failed to start WSL2 with assertation error at "GetVmId.cpp" #310

Closed SubhashBose closed 1 year ago

SubhashBose commented 2 years ago

I am on Windows 11. When trying to start a WSL2 distribution I get the following error for a split second and closes. So, I captured the error by running wslbridge2.exe

assertion "hRes == 0" failed: file "GetVmId.cpp", line 194, function: HRESULT GetVmId(GUID*, GUID*)
      0 [main] wslbridge2 1320 cygwin_exception::open_stackdumpfile: Dumping stack trace to wslbridge2.exe.stackdump

The important part is, this error ONLY occurs when the WSL2 virtual machine is not already running, i.e, after a fresh reboot of windows or wsl2 VM was shutdown by wsl --shutdown. Once WSL is already started by regular method (say from start menu) and then closed., the linux terminal closes but WSL2 VM keeps running in the background. So, now when I start wsltty/mintty/wslbridge2.exe it runs fine..

My temporary workaround is to run wsltty from a .bat file but first to invoke wsl using the regular way. This works but is not optimal because it increased the startup time unnecessarily.

wslg ~ exit

start "" "%~dp0bin\mintty.exe" -i "%~dp0wsl.ico" --WSL= --configdir="%~dp0Appdata" -~   %*

I am using the latest release of wsltty (3.6.0).

Biswa96 commented 2 years ago

Are you using Windows Store version of WSL? The preview one.

SubhashBose commented 2 years ago

Thank you for your reply. Going to the start menu I can see it is mentioned "Windows Subsystem for Linux Preview", so I suppose this is the preview one you are asking for. However, I didn't install it from Windows Store. I simply ran the command wsl --install in a fresh installation of Win11.

Biswa96 commented 2 years ago

This seems to be duplicate of https://github.com/mintty/wsltty/issues/302. My apology for being late. Just wait a day or so 🙇

SubhashBose commented 2 years ago

Ok. Thanks.

mintty commented 1 year ago

Closed as fixed with wslbridge2 0.10.