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

Python processes not killed on windows 11 #57

Open
PGComai opened this issue Nov 30, 2024 · 6 comments
Open

Python processes not killed on windows 11 #57

PGComai opened this issue Nov 30, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@PGComai
Copy link

PGComai commented Nov 30, 2024

I am new to SnekStudio and I have been playing around with it. I noticed that each time I run it a python process is started but is not killed when I quit. These are from running in the Godot editor, I am not sure if this also happens when exported.

Screenshot 2024-11-30 115301

ExpiredPopsicle added a commit that referenced this issue Dec 7, 2024
- Fixed some tracker process lifetime issues. Now starts/stops with scene_init and scene_shutdown.
- Fixed tracker process not shutting down when using "load settings" in the menu.
- Removed a lot of cruft from the old tracker process system.
- Possible fix for #57 ?
@ExpiredPopsicle
Copy link
Owner

Hiya! I just checked in a bit of a refactor to the Python tracker process lifetime. Can you verify whether or not this is still happening with the new changes?

@PGComai
Copy link
Author

PGComai commented Dec 9, 2024

Looks to be partially fixed. The processes are killed when I quit by hitting the X in the corner (as in standard window closing) but they are not killed if I press the stop button in the Godot editor.

@PGComai
Copy link
Author

PGComai commented Dec 10, 2024

Is this something worth fixing? If it is then I have an idea using a little save file to track python PIDs started through SnekStudio and then calling OS.kill() next time it is run, but I don't know how good of an idea it is to have Godot kill a process just by its PID. I have not been successful in trying to close the process otherwise, Godot seems to stop things quite abruptly.

@ExpiredPopsicle
Copy link
Owner

While it is a little concerning that it's not shutting down. The Python script is designed to throw an exception when the TCP/IP connection to the application dies, implying that the connection might be sticking around for some reason. Should be easy enough to fix with some kind of keepalive message in the RPC wrapper layer.

@ExpiredPopsicle ExpiredPopsicle added the bug Something isn't working label Dec 10, 2024
@copygirl
Copy link

How would the connection stay around when SnekStudio is closed?

@ExpiredPopsicle
Copy link
Owner

Could just be Godot leaking connections inside the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants