music-assistant / companion

Music Assistant Companion App
https://music-assistant.io/companion-app/
Apache License 2.0
28 stars 4 forks source link

[Windows] Exiting the app doesn't stop Squeezelite background process #9

Closed Sirs0ri closed 8 months ago

Sirs0ri commented 9 months ago

The Problem

When relaunching the app (either manually, or through the "relaunch" option in the system tray), the new session won't be able to connect to musicassistant, because the 1st instance's squeezelite background process never got killed.

This leads to a) the player not working at all, b) a warning being spammed in the MAss logs, c) visual glitches, because the display name of the companion player in the UI will be flickering between it's actual name and the player ID

This can be fixed by opening the task manager, finding the orphaned squeezelite process, and killing it manually.

Versions

Music Assistant Server: 2.0.0b73 Companion App: v0.0.20 Windows 10 22H2, build 19045.3516

Logs & Screenshots

MAss Log:

2023-10-02 11:28:17.120 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.259 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.396 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.517 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.640 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.764 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!
2023-10-02 11:28:17.887 WARNING (MainThread) [music_assistant.providers.slimproto] Player squeezeplay: 00:15:5d:77:13:6d connected while previous session still existing!

The active instance in Task Manager: grafik

The orphaned instance: grafik

arctixdev commented 9 months ago

Nice catch! Yeah that's a problem, i will release a fix later 🙂

arctixdev commented 8 months ago

Hey sorry for not responding in like a week.. i had a very important school assignment which is now over. I just fixed the issue, building now and should be out in roughly 10-15 minutes :slightly_smiling_face: