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
- Download current nightly – at the time of writing: https://github.com/theRealCarneiro/pulsemeeter/commit/6a7d8162aacb64fae01e6448f99fa154de12f04e
- Start in Terminal
- let it run for a while, play some audio, do other things
- quit in GUI, check if you get returned to your shell
- 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.