microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.25k stars 309 forks source link

Launching sublime-text is crashing WSL #1051

Open castorfou opened 1 year ago

castorfou commented 1 year ago

Windows build number:

10.0.19045.0

Your Distribution version:

22.04

Your WSL versions:

Version WSL : 1.2.5.0 Version du noyau : 5.15.90.1 Version WSLg : 1.0.51 Version MSRDC : 1.2.3770 Version direct3D : 1.608.2-61064218 Version de DXCore : 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Version de Windows : 10.0.19045.2846

Steps to reproduce:

  1. install sublime-text with snap (sudo snap install sublime-text --classic)
  2. launch nautilus
  3. open a text file from nautilus (right click on a text file, Open with Sublime Text) image

WSL logs:

pulseaudio.log stderr.log weston.log

WSL dumps:

no files in dumps

Expected behavior:

sublime-text is launched and I can use it

Actual behavior:

  1. doing so launches sublime-text for less than 1 sec and then all WSL apps close.
  2. I can re-launch terminal for exemple from Powershell (wslg.exe -d ubuntu-22.04 --cd "~" -- tilix) and then all the previous windows reappear but in a kind of zombie mode: I cannot interact with them, click or move windows. Actually I can click Windows and they will get on top of others but that's it. image
  3. The only way to recover is to terminate wsl (wsl -t ubuntu-22.04)
silverham commented 1 year ago

Hi, I would like to note that if you install Sublime normally in WSLg, it can work if you run sudo apt install libgl1, else you will receive the error:

myusername@computername:~$ subl
/opt/sublime_text/sublime_text: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

Credit: https://askubuntu.com/a/575808/1685479

Normal install commands for reference:

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/sublimehq-archive.gpg > /dev/null
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

@see https://www.sublimetext.com/docs/linux_repositories.html

Tested in Windows 10 Version 22H2 Build 19045.3086 (in Hyper V Windows 10 Guest, Host is also Windows 10 though)

myusername@computername:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

C:\Users\myusername>wsl --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3086