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

Ctrl+C or quitting via GUI sometimes doesn't kill pulsemeeter-nightly started from CLI #104

Open
heylix opened this issue Nov 29, 2022 · 1 comment

Comments

@heylix
Copy link

heylix commented Nov 29, 2022

Describe the bug
If you start pulsemeeter with just pulsemeeter in the CLI and close it in your DE, sometimes it says "writing config" and doesn't properly exit and return you to your shell. Only kill -9 actually helps in that situation, kill -15 or Ctrl+C doesn't. Most of the time it works.

To Reproduce

  1. Download current nightly – at the time of writing: 6a7d816
  2. Start in Terminal
  3. let it run for a while, play some audio, do other things
  4. quit in GUI, check if you get returned to your shell
  5. check if you get returned if you hit Ctrl+C

Expected behavior
Pulsemeeter actually exits 100% of the time when you hit Ctrl+C or quit the app.

Logs

Closed via GUI:

[DEBUG] in [logger@init_log]: started logger instance <Logger generic (DEBUG)> at thread 18840
[DEBUG] in [audio_server@start_sinks]: pmctl init sink GPU+AUX "2"

[DEBUG] in [audio_server@start_sources]: 
[DEBUG] in [audio_server@start_primarys]: 
[DEBUG] in [server@query_clients]: new client 0
[DEBUG] in [server@listen_to_client]: message from client #0, size 10: b'get-config'
[DEBUG] in [audio_server@handle_command]: get-config
[DEBUG] in [server@listen_to_client]: message from client #0, size 4: b'exit'
[DEBUG] in [server@listen_to_client]: message from client #0, size 4: b'quit'
[INFO] in [client@disconnect]: closing connection to socket
[DEBUG] in [server@listen_to_client]: client 0 disconnect
[INFO] in [client@listen]: closing socket
[INFO] in [audio_server@main_loop]: sending exit signal to listener threads, they should exit within a few seconds...
[DEBUG] in [audio_server@save_config]: writing config

Desktop (please complete the following information):

  • Distro: Arch
  • Python Version 3.10

Additional information:

Sometimes it just works, then it looks like (closed via Ctrl+C):

[DEBUG] in [logger@init_log]: started logger instance <Logger generic (DEBUG)> at thread 19188
[DEBUG] in [audio_server@start_sinks]: pmctl init sink GPU+AUX "2"

[DEBUG] in [audio_server@start_sources]: 
[DEBUG] in [audio_server@start_primarys]: 
[DEBUG] in [server@query_clients]: new client 0
[DEBUG] in [server@listen_to_client]: message from client #0, size 10: b'get-config'
[DEBUG] in [audio_server@handle_command]: get-config
^C[INFO] in [audio_server@main_loop]: sending exit signal to listener threads, they should exit within a few seconds...
[DEBUG] in [audio_server@save_config]: writing config
[INFO] in [client@disconnect]: closing connection to socket
[DEBUG] in [server@listen_to_client]: message from client #0, size 4: b'quit'
[DEBUG] in [server@listen_to_client]: client 0 disconnect
[INFO] in [client@listen]: closing socket

Especially after Pulsemeeter has been open for a while it seems to hang upon exit/quit.

@theRealCarneiro
Copy link
Owner

those two first 'exit' messagens were you trying to exit? I belive it's a bad exception that I didn't threat in the client, causing it to close and request the server to close

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

2 participants