Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemExit Exception #154

Open
nicola-lunghi opened this issue Jun 27, 2022 · 30 comments
Open

SystemExit Exception #154

nicola-lunghi opened this issue Jun 27, 2022 · 30 comments

Comments

@nicola-lunghi
Copy link

nicola-lunghi commented Jun 27, 2022

If in windows I click the Exit button I got the following exception:

2022-06-27 12:37:05,512 - __main__ - ERROR - Exception occurred in main loop
Traceback (most recent call last):
  File "main.py", line 615, in main
SystemExit
2022-06-27 12:37:11,727 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted.
Traceback (most recent call last):
  File "main.py", line 615, in main
SystemExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 697, in <module>
  File "main.py", line 621, in main
SystemExit

GWSL version 1.4.0 from Microsoft store

the issue could be here?

GWSL-Source/manager.py

Lines 1222 to 1227 in 20e53a8

for event in pygame.event.get():
if event.type == QUIT:
# subprocess.getoutput('taskkill /F /IM GWSL_service.exe')
# subprocess.getoutput('taskkill /F /IM GWSL_vcxsrv.exe')
pygame.quit()
sys.exit()

@jrtokarz
Copy link

jrtokarz commented Aug 2, 2022

Seeing the same issue:
GWSL 1.4.0 from MS Store
Edition Windows 10 Enterprise
Version 21H2
Installed on ‎28/‎09/‎2021
OS build 19044.1826
Experience Windows Feature Experience Pack 120.2212.4180.0

App closed because the X server service fails.
Running 'GWSL_vcxsrv.exe' from the terminal gives the following:

$ ./GWSL_vcxsrv.exe
Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.9.0

OS: Windows NT 6.2 build 9200 (64-bit)
Contact: [email protected]

LoadPreferences: C:\Users\Tokarz.SIT\.XWinrc not found
LoadPreferences: Loading C:\Users\Tokarz.SIT\AppData\Roaming\GWSL\VCXSRV\system.XWinrc
Segmentation fault

@Pololot64
Copy link
Member

Hmm. Is this only on exit @jrtokarz ?

@jrtokarz
Copy link

jrtokarz commented Aug 5, 2022

@Pololot64 no, this is on starting GWSL

@hemanta212
Copy link

After the 1.4.5 update, it stopped working for me with this same issue,

Installed through the windows store version
GWSL 1.4.5
WSL 2
Windows 11 21H2 (Build:22000.1455)

Dashboard log is empty

service log

2023-01-30 14:45:05,964 - __main__ - ERROR - Exception occurred in main loop
Traceback (most recent call last):
  File "main.py", line 675, in main
SystemExit
2023-01-30 14:45:06,434 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted.
Traceback (most recent call last):
  File "main.py", line 675, in main
SystemExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 757, in <module>
  File "main.py", line 681, in main
SystemExit

happy to provide with any other info

@Pololot64
Copy link
Member

After the 1.4.5 update, it stopped working for me with this same issue,

Installed through the windows store version
GWSL 1.4.5
WSL 2
Windows 11 21H2 (Build:22000.1455)

Dashboard log is empty

service log

2023-01-30 14:45:05,964 - __main__ - ERROR - Exception occurred in main loop
Traceback (most recent call last):
  File "main.py", line 675, in main
SystemExit
2023-01-30 14:45:06,434 - __main__ - ERROR - Exception occurred - Cannot Start Service. Make sure the settings file is not corrupted.
Traceback (most recent call last):
  File "main.py", line 675, in main
SystemExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 757, in <module>
  File "main.py", line 681, in main
SystemExit

happy to provide with any other info

Could you upload your settings file? (Make sure there is no personal info in it first)

@hemanta212
Copy link

hemanta212 commented Jan 30, 2023

is it the settings.json file stored in the same dir as logs ? (i.e at %AppData%/GWSL/), I suppose so

http://sprunge.us/ljh8C1

@Pololot64
Copy link
Member

Wait. Is gwsl failing to run or are Linux apps failing to run?

@hemanta212
Copy link

hemanta212 commented Jan 30, 2023

It appears the gwsl is giving those errors when it starts, basically, when I run gwsl at the windows startup it appears in the tray but viewing its logs shows the above errors. Opening wsl and running GUI apps don't work either and don't add any errors to the log.

exiting the gwsl from the tray and relaunching it again appends same error in the log.

I do have enabled the wslg GUI in the .wslconfig file but the shell configuration by default exports the DISPLAY to point to GWSL,
when I run Linux apps through a command like

DISPLAY=:0 xclock

they run successfully in wslg

@Pololot64
Copy link
Member

Can you re-verify that gwsl is allowed through the firewall? That is likely the issue. (See the manual for details or click the button in GWSL Dashboard / about )

@hemanta212
Copy link

I rechecked the firewall settings, looks like I've allowed it, for good measure I allowed all gwsl and related apps both public and private access then exited and restarted gwsl. Still does not seem to work and produce same errors in the log.

@Pololot64
Copy link
Member

Well one thing I know is that the issue is kind of "fake" because GWSL tends to spam that error message. It generally means nothing. I can fix it but since it does not affect functionality I don't have time at the moment.

So, just to clarify, GWSL is not crashing in any way?

It may also be wslg conflicting with it. I would recommend disabling it to check.

@hemanta212
Copy link

ok i'll try to reinstall gwsl and also try disabling the wslg and see if it works.

@hemanta212
Copy link

Disabled wslg, reinstalled Gwsl, restarted the system but still cant make it work unfortunately

@Pololot64
Copy link
Member

I'll do some more thinking 🤔

@Pololot64
Copy link
Member

Are you using a VPN anywhere or anything?

@hemanta212
Copy link

no, I am not using VPN.

@hemanta212
Copy link

only thing i remember that may have effect is updating gwsl from store, otherwise I had running it fine and had no other environmental change whatsoever

@Pololot64
Copy link
Member

Pololot64 commented Jan 30, 2023

Now that wslg is disabled, what error do you get if you launch a GUI app directly from bash?

@hemanta212
Copy link

hemanta212 commented Jan 31, 2023

when i launch an gui app through bash it does nothing just get stuck, no window pops up nothing,
exporting display to non existing port would error out so it means the connection with gwsl is there but just no window shows up by gwsl.

@Pololot64
Copy link
Member

This is really strange. I know the xclock works so this makes it more strange. Maybe the new vcxsrv backend version has a bug. I doubt it but maybe

@hemanta212
Copy link

i tried with xclock it hunged, so left it and after some time exited with

Error: Can't open display: 172.28.176.1:0.0

@Pololot64
Copy link
Member

Aha... this is good information. Can you ping that IP address from inside wsl? Also, is your distro wsl1 or wsl2?

@hemanta212
Copy link

its wsl2 and display was exported through the function auto inserted by GWSL in bashrc.

ping output

PING 172.27.176.1 (172.27.176.1) 56(84) bytes of data.

it then hangs

@Pololot64
Copy link
Member

Aha. This is incredibly unrelated to the GWSL update then. I know you did it before but go into firewall settings and delete all rules related to GWSL. Something has likely gotten messed up.

@hemanta212
Copy link

ok so there were multiple entries in the firewall for GWSL VCXsrv windows server HIDPI so I removed all except one and now it worked

@Pololot64
Copy link
Member

Awesome :)

@hemanta212
Copy link

so what was the issue? how did those entries came there in first place, was it due to update or just some coincidence?

@hemanta212
Copy link

Any way glad to have this finally sorted out and work. Thank you so much for the support here hope you have an awesome day.
btw will those deleted fpulseaudio firewall entries auto populate itself through windows firewall requests when I use them?

@Pololot64
Copy link
Member

What happens is that sometimes, after an update, Windows detects GWSL as a new program and asks you to allow it through again. That second prompt can be easy to miss. It causes 90% percent of problems.

@Pololot64
Copy link
Member

Yes the rules will come back when you start GWSL the next time and give public access when it gives the prompts. Glad to help. Have a wonderful day too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants